cmake(ci): Fix python docker jobs

This commit is contained in:
Mizux Seiha
2023-06-15 17:19:06 +02:00
parent 63fa2562e5
commit 465c232f1e
2 changed files with 11 additions and 4 deletions

View File

@@ -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 .

View File

@@ -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 .