opm-simulators/python/Dockerfile

22 lines
707 B
Docker
Raw Permalink Normal View History

2024-08-23 06:03:48 -05:00
# Dockerfile to generate PyPI packages. Needs to be run from the opm-common root folder
# Example use:
# sudo docker build -t manylinux2014_opm:built . -f python/Dockerfile
FROM quay.io/pypa/manylinux_2_28_x86_64 AS stage1
2024-11-07 04:45:03 -06:00
ARG version="master"
2024-08-23 06:03:48 -05:00
ARG build_jobs=4
2024-11-07 04:45:03 -06:00
ARG version_tag=""
2024-08-23 06:03:48 -05:00
WORKDIR /tmp/opm
2024-11-07 04:45:03 -06:00
RUN echo "Using version: $version"
2024-08-23 06:03:48 -05:00
RUN echo "Using package version tag: $version_tag"
2024-11-07 04:45:03 -06:00
RUN echo "Number of build jobs: $build_jobs"
2024-08-23 06:03:48 -05:00
ADD . .
RUN /bin/bash setup-docker-image.sh
FROM stage1 AS stage2
RUN /bin/bash build-deps.sh $build_jobs
FROM stage2 AS stage3
2024-11-07 04:45:03 -06:00
RUN /bin/bash generate-pypi-package.sh "$version" "$build_jobs" "$version_tag"
2024-08-23 06:03:48 -05:00
FROM scratch AS export_stage
COPY --from=stage3 /tmp/opm/wheelhouse .