Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ COPY docker/common/install_ffmpeg.sh .
RUN bash install_ffmpeg.sh && \
rm install_ffmpeg.sh

FROM nemo_curator_dep AS nemo_curator

ARG INTERN_VIDEO_COMMIT=09d872e5093296c6f36b8b3a91fc511b76433bf7
COPY external/intern_video2_multimodal.patch .
Expand All @@ -73,14 +72,19 @@ RUN git clone https://github.com/OpenGVLab/InternVideo.git && \
patch -p1 < /opt/intern_video2_multimodal.patch && \
rm /opt/intern_video2_multimodal.patch

FROM nemo_curator_dep AS nemo_curator

WORKDIR /opt/Curator

# Selective file copying before dependency installation for better layer caching
COPY pyproject.toml uv.lock /opt/Curator/
COPY nemo_curator/__init__.py nemo_curator/package_info.py /opt/Curator/nemo_curator/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nemo_curator/__init__.py imports cosmos_xenna.ray_utils.cluster on line 34, which won't be available until after uv sync runs. This will cause the build to fail when uv tries to read the version from nemo_curator.package_info.__version__.

Suggested change
COPY nemo_curator/__init__.py nemo_curator/package_info.py /opt/Curator/nemo_curator/
COPY nemo_curator/package_info.py /opt/Curator/nemo_curator/

Remove __init__.py from this COPY command and only copy package_info.py which is actually needed for version resolution.


# Install Curator
RUN uv sync --link-mode copy --locked --extra all --all-groups --no-cache && \
uv add /opt/InternVideo/InternVideo2/multi_modality

COPY . /opt/Curator
RUN cd /opt/Curator && \
uv sync --link-mode copy --locked --extra all --all-groups && \
uv add /opt/InternVideo/InternVideo2/multi_modality && \
uv cache prune && \
uv cache clean distance && \
find /opt/uv_cache/ -type d -path "*ray/_private/runtime_env/agent/thirdparty_files/aiohttp*" -exec rm -rf {} +

COPY <<EOF /opt/venv/env.sh
export UV_PROJECT_ENVIRONMENT=/opt/venv
Expand Down
Loading