diff --git a/docker/main/ngen/Dockerfile b/docker/main/ngen/Dockerfile index bd7a59457..f126661a9 100644 --- a/docker/main/ngen/Dockerfile +++ b/docker/main/ngen/Dockerfile @@ -290,12 +290,16 @@ FROM rocky-base as rocky-ngen-packaged-deps ARG ROCKY_NGEN_DEPS_REQUIRED +# Set up pip constraints file for this and descendent stages +COPY constraints.txt ${WORKDIR}/constraints.txt +ENV PIP_CONSTRAINT=${WORKDIR}/constraints.txt + # TODO: later, go back and change all pip3/python3 to just pip/python (but leave for now to limit scope) # Note that this includes numpy, which is needed for Python BMI support, regardless of BMI module USER root RUN dnf update -y && dnf install -y ${ROCKY_NGEN_DEPS_REQUIRED} && dnf clean -y all \ && ln -s $(which python3) $(which python3 | sed 's/python3/python/') \ - && pip install --no-cache-dir "pip>=23.0,<23.1" wheel packaging \ + && pip install --no-cache-dir pip wheel packaging \ && if [ "${NGEN_WITH_PYTHON}" == "ON" ]; then pip install --no-cache-dir numpy; fi USER ${USER} diff --git a/docker/main/ngen/constraints.txt b/docker/main/ngen/constraints.txt new file mode 100644 index 000000000..6a53b3f2b --- /dev/null +++ b/docker/main/ngen/constraints.txt @@ -0,0 +1,5 @@ +### Constrain pip +pip>=23.0,<23.1 + +### Constrain numpy to < 2.0.0 due to current ngen compatibility issue +numpy~=1.0 \ No newline at end of file