cmake(ci): Fix python docker jobs
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
FROM ortools/cmake:archlinux_swig AS env
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
RUN pacman -Syu --noconfirm python python-pip
|
||||
RUN pacman -Syu --noconfirm python python-pip \
|
||||
python-wheel python-numpy python-pandas
|
||||
RUN python -m pip install --break-system-package \
|
||||
absl-py mypy-protobuf
|
||||
|
||||
FROM env AS devel
|
||||
WORKDIR /home/project
|
||||
@@ -17,7 +20,7 @@ RUN CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
|
||||
FROM env AS install_env
|
||||
WORKDIR /home/sample
|
||||
COPY --from=build /home/project/build/python/dist/*.whl .
|
||||
RUN python -m pip install *.whl
|
||||
RUN python -m pip install --break-system-packages *.whl
|
||||
|
||||
FROM install_env AS install_devel
|
||||
COPY cmake/samples/python .
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
FROM ortools/cmake:debian_swig AS env
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yq python3-dev python3-pip python3-venv \
|
||||
&& apt-get install -yq python3-dev python3-pip \
|
||||
python3-wheel python3-venv \
|
||||
python3-numpy python3-pandas \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
RUN python3 -m pip install --break-system-package \
|
||||
absl-py mypy-protobuf
|
||||
|
||||
FROM env AS devel
|
||||
WORKDIR /home/project
|
||||
@@ -20,7 +24,7 @@ RUN CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
|
||||
FROM env AS install_env
|
||||
WORKDIR /home/sample
|
||||
COPY --from=build /home/project/build/python/dist/*.whl .
|
||||
RUN python3 -m pip install *.whl
|
||||
RUN python3 -m pip install --break-system-packages *.whl
|
||||
|
||||
FROM install_env AS install_devel
|
||||
COPY cmake/samples/python .
|
||||
|
||||
Reference in New Issue
Block a user