diff --git a/Dockerfile b/Dockerfile index a85e6ecac4..3fdf306b17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,18 +76,21 @@ RUN rm -rf /opt/pytorch/pytorch/third_party/onnx # Use UV to install python packages from the workspace. This just installs packages into the system's python -# environment, and does not use the current uv.lock file. +# environment, and does not use the current uv.lock file. Note that with python 3.12, we now need to set +# UV_BREAK_SYSTEM_PACKAGES, since the pytorch base image has made the decision not to use a virtual environment and UV +# does not respect the PIP_BREAK_SYSTEM_PACKAGES environment variable set in the base dockerfile. COPY --from=ghcr.io/astral-sh/uv:0.4.25 /uv /usr/local/bin/uv ENV UV_LINK_MODE=copy \ UV_COMPILE_BYTECODE=1 \ UV_PYTHON_DOWNLOADS=never \ UV_SYSTEM_PYTHON=true \ - UV_NO_CACHE=1 + UV_NO_CACHE=1 \ + UV_BREAK_SYSTEM_PACKAGES=1 -# Install the bionemo-geomtric requirements ahead of copying over the rest of the repo, so that we can cache their +# Install the bionemo-geometric requirements ahead of copying over the rest of the repo, so that we can cache their # installation. These involve building some torch extensions, so they can take a while to install. RUN --mount=type=bind,source=./sub-packages/bionemo-geometric/requirements.txt,target=/requirements-pyg.txt \ - uv pip install --break-system-packages --no-build-isolation -r /requirements-pyg.txt + uv pip install --no-build-isolation -r /requirements-pyg.txt WORKDIR /workspace/bionemo2 @@ -110,16 +113,16 @@ RUN --mount=type=bind,source=./.git,target=./.git \ --mount=type=bind,source=./requirements-cve.txt,target=/requirements-cve.txt \ <