From 26af4846efefbca5fde2d6854b694dcba48e8b16 Mon Sep 17 00:00:00 2001 From: "Peter St. John" Date: Wed, 8 Jan 2025 13:54:05 -0700 Subject: [PATCH] Refactor dockerfile for better caching and avoid pbss download in notebook test (#573) Re-orders some of the Dockerfile commands to avoid re-building `tensorstore` from source every docker build. Also removes the pbss download from `test_load_notebook.ipynb` since this can't succeed outside the nvidia VPN Signed-off-by: Peter St. John --- Dockerfile | 34 ++++++++------- .../core/data/test_load_notebook.ipynb | 42 ++++--------------- 2 files changed, 27 insertions(+), 49 deletions(-) diff --git a/Dockerfile b/Dockerfile index 169bbe2362..c963e831dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,26 +92,13 @@ ENV UV_LINK_MODE=copy \ RUN --mount=type=bind,source=./sub-packages/bionemo-geometric/requirements.txt,target=/requirements-pyg.txt \ uv pip install --no-build-isolation -r /requirements-pyg.txt -WORKDIR /workspace/bionemo2 - -# Install 3rd-party deps and bionemo submodules. -COPY ./LICENSE /workspace/bionemo2/LICENSE -COPY ./3rdparty /workspace/bionemo2/3rdparty -COPY ./sub-packages /workspace/bionemo2/sub-packages - COPY --from=rust-env /usr/local/cargo /usr/local/cargo COPY --from=rust-env /usr/local/rustup /usr/local/rustup ENV PATH="/usr/local/cargo/bin:/usr/local/rustup/bin:${PATH}" ENV RUSTUP_HOME="/usr/local/rustup" -# Note, we need to mount the .git folder here so that setuptools-scm is able to fetch git tag for version. -# Includes a hack to install tensorstore 0.1.45, which doesn't distribute a pypi wheel for python 3.12, and the metadata -# in the source distribution doesn't match the expected pypi version. -RUN --mount=type=bind,source=./.git,target=./.git \ - --mount=type=bind,source=./requirements-test.txt,target=/requirements-test.txt \ - --mount=type=bind,source=./requirements-cve.txt,target=/requirements-cve.txt \ - <