Skip to content

Commit

Permalink
tools/docker: Fix alpine build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 1, 2021
1 parent fddabae commit 86d4c54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ $(python_targets_export): python_amd64_%_export: python_amd64_%_build | export
${DOCKER_RUN_CMD} \
-v `pwd`/export:/export \
-it ${IMAGE}:python_amd64_$*_build \
"cp build_*/python/dist/*.whl /export/python"
"cp build*/python/dist/*.whl /export/python"

## ARM64v8
PYTHON_ARM_DISTROS = $(addprefix arm64v8_, $(PYTHON_DISTROS))
Expand Down Expand Up @@ -265,7 +265,7 @@ $(python_arm_targets_export): python_arm64v8_%_export: python_arm64v8_%_build |
${DOCKER_RUN_CMD} \
-v `pwd`/export:/export \
-it ${IMAGE}:python_arm64v8_$*_build \
"cp build_*/python/dist/*.whl /export/python"
"cp build*/python/dist/*.whl /export/python"

## MERGE ##
.PHONY: python
Expand Down
4 changes: 3 additions & 1 deletion tools/docker/python/amd64/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ WORKDIR /root/or-tools
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON -DBUILD_PYTHON=ON
RUN cmake --build build -v -j8
# Rename wheel package ortools-version+musl-....
RUN cp build/python/dist//ortools-*.whl .
RUN cp build/python/dist/ortools-*.whl .
RUN NAME=$(ls *.whl | sed -e "s/\(ortools-[0-9\.]\+\)/\1+musl/") && mv *.whl "${NAME}"
RUN rm build/python/dist/ortools-*.whl
RUN mv *.whl build/python/dist/

FROM build AS test
RUN cmake --build build --target test
4 changes: 3 additions & 1 deletion tools/docker/python/arm64v8/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ WORKDIR /root/or-tools
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON -DBUILD_PYTHON=ON
RUN cmake --build build -v -j8
# Rename wheel package ortools-version+musl-....
RUN cp build/python/dist//ortools-*.whl .
RUN cp build/python/dist/ortools-*.whl .
RUN NAME=$(ls *.whl | sed -e "s/\(ortools-[0-9\.]\+\)/\1+musl/") && mv *.whl "${NAME}"
RUN rm build/python/dist/ortools-*.whl
RUN mv *.whl build/python/dist/

FROM build AS test
RUN cmake --build build --target test

0 comments on commit 86d4c54

Please sign in to comment.