@@ -9,6 +9,7 @@ ARG PACKAGE_VERSION="3.1.0"
99# ## BASE IMAGE
1010FROM ${REGISTRY}/$BASE_IMAGE AS base
1111ARG BASE_IMAGE
12+ ARG CAPSTONE_VERSION
1213
1314# Copy dependencies lists into container. We copy them all and then do a mv because
1415# we need to transform base_image into a windows compatible filename which we can't
@@ -22,12 +23,6 @@ RUN apt-get -qq update && \
2223
2324COPY ./panda/dependencies/${BASE_IMAGE/:/_}_build.txt /tmp/build_dep.txt
2425
25- # ## BUILD IMAGE - STAGE 2
26- FROM base AS builder
27- ARG BASE_IMAGE
28- ARG TARGET_LIST
29- ARG CAPSTONE_VERSION
30-
3126RUN apt-get -qq update && \
3227 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /tmp/build_dep.txt | grep -o '^[^#]*' ) && \
3328 apt-get clean && \
@@ -52,6 +47,10 @@ RUN cd /tmp && \
5247 dpkg -i /tmp/libosi_${BASE_IMAGE_VERSION}.deb && \
5348 rm -rf /tmp/libosi_${BASE_IMAGE_VERSION}.deb
5449
50+ # ## BUILD IMAGE - STAGE 2
51+ FROM base AS builder
52+ ARG TARGET_LIST
53+
5554# Build and install panda
5655# Copy repo root directory to /panda, note we explicitly copy in .git directory
5756# Note .dockerignore file keeps us from copying things we don't need
@@ -76,7 +75,7 @@ RUN git -C /panda submodule update --init dtc && \
7675 --prefix=/usr/local \
7776 --disable-numa \
7877 --enable-llvm && \
79- rm -rf /panda/.git
78+ rm -rf /panda/.git
8079
8180RUN PRETEND_VERSION=$(cat /tmp/savedversion) make -C /panda/build -j "$(nproc)"
8281
@@ -107,9 +106,6 @@ RUN cd /panda/panda/python/core && \
107106 python3 create_panda_datatypes.py --install && \
108107 PRETEND_VERSION=$(cat /tmp/savedversion) python3 -m build --wheel . && \
109108 PRETEND_VERSION=$(cat /tmp/savedversion) pip install .
110- RUN python3 -m pip install --upgrade pip "setuptools<65.6.0" && \
111- python3 -m pip install "pycparser<2.22" && \
112- python3 -m pip install --force-reinstall --no-binary :all: cffi
113109
114110# BUG: PANDA sometimes fails to generate all the necessary files for PyPANDA. This is a temporary fix to detect and fail when this occurs
115111RUN ls -alt $(pip show pandare | grep Location: | awk '{print $2}' )/pandare/autogen/
0 commit comments