Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions docker/Dockerfile.nmp-customizer-tasks
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
"grpcio>=1.81.1,<2" \
"jupyter-server>=2.20.0,<3" \
"mistune>=3.3.3,<4" \
"pillow>=12.3.0,<13" \
"soupsieve>=2.8.4,<3" \
"tornado>=6.5.7,<7" \
"urllib3>=2.7.0,<3" \
Expand Down Expand Up @@ -107,6 +108,9 @@ RUN apt-get update && \
/usr/local/lib/python3.12/dist-packages/mlflow \
/usr/local/lib/python3.12/dist-packages/mlflow-*.dist-info \
/usr/local/lib/python3.12/dist-packages/mlflow_skinny-*.dist-info \
/usr/local/lib/python3.12/dist-packages/PIL \
/usr/local/lib/python3.12/dist-packages/pillow.libs \
/usr/local/lib/python3.12/dist-packages/pillow-*.dist-info \
/usr/local/lib/python3.12/dist-packages/mistune \
/usr/local/lib/python3.12/dist-packages/mistune-*.dist-info \
/usr/local/lib/python3.12/dist-packages/soupsieve \
Expand Down
9 changes: 9 additions & 0 deletions docker/Dockerfile.nmp-rl-base
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ ENV VIRTUAL_ENV=/opt/nemo_rl_venv \
# editable installs in the training image can write.
RUN chmod 755 /root /root/.cache /root/.cache/uv /root/.local /root/.local/share /root/.local/share/uv 2>/dev/null || true

# CVE remediation for fixable Ubuntu packages inherited from the NeMo-RL base.
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --only-upgrade \
libssl3t64 \
openssl \
rsync && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# NeMo-RL is installed EDITABLE in this base: its source tree lives at
# /opt/nemo-rl (root-owned, non-traversable) and the editable import finder
# os.stat()s files under it at import time. The training image drops to
Expand Down
20 changes: 20 additions & 0 deletions docker/Dockerfile.nmp-rl-training
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,26 @@ RUN --mount=from=ffmpeg-vlm-wheel-src,target=/tmp/ffmpeg-vlm-wheel-src,readonly
/tmp/ffmpeg-vlm-wheel-src/wheels/opencv_python_headless-*cp313*.whl \
/tmp/ffmpeg-vlm-wheel-src/wheels/decord2-*cp313*.whl

# Replace Pillow copies that can be left in the inherited NeMo-RL venv/uv cache.
RUN --mount=type=cache,target=/root/.cache/uv \
set -e; \
for site in ${VIRTUAL_ENV}/lib/python*/site-packages; do \
[ -d "${site}" ] || continue; \
rm -rf \
"${site}/PIL" \
"${site}/pillow.libs" \
"${site}"/pillow-*.dist-info; \
done; \
for archive in /root/.cache/uv/archive-v0/*; do \
[ -d "${archive}" ] || continue; \
if [ -e "${archive}/pillow.libs" ] || \
[ -e "${archive}/pillow-12.2.0.dist-info" ]; then \
rm -rf "${archive}"; \
fi; \
done; \
uv pip install --python ${VIRTUAL_ENV}/bin/python --no-cache --no-deps --reinstall \
"pillow>=12.3.0,<13"

# The NeMo-RL base venv ships some packages with missing dist-info METADATA (a
# known property of the image — the package code is present, only uv's metadata
# file is gone). Normal `uv pip install` reads ALL installed metadata during
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile.nmp-unsloth-training
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
"urllib3>=2.7.0,<3" \
"grpcio>=1.81.1,<2" \
"mistune>=3.3.3,<4" \
"pillow>=12.3.0,<13" \
"soupsieve>=2.8.4,<3" \
"mlflow-skinny>=3.11.1,<3.12.0"

Expand Down Expand Up @@ -207,6 +208,9 @@ RUN rm -rf \
/usr/local/lib/python3.12/dist-packages/mlflow \
/usr/local/lib/python3.12/dist-packages/mlflow-*.dist-info \
/usr/local/lib/python3.12/dist-packages/mlflow_skinny-*.dist-info \
/usr/local/lib/python3.12/dist-packages/PIL \
/usr/local/lib/python3.12/dist-packages/pillow.libs \
/usr/local/lib/python3.12/dist-packages/pillow-*.dist-info \
/usr/local/lib/python3.12/dist-packages/mistune \
/usr/local/lib/python3.12/dist-packages/mistune-*.dist-info \
/usr/local/lib/python3.12/dist-packages/soupsieve \
Expand Down
3 changes: 3 additions & 0 deletions docker/automodel/Dockerfile.nmp-automodel-base
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ RUN rm -rf \
/usr/local/lib/python3.12/dist-packages/mlflow \
/usr/local/lib/python3.12/dist-packages/mlflow-*.dist-info \
/usr/local/lib/python3.12/dist-packages/mlflow_skinny-*.dist-info \
/usr/local/lib/python3.12/dist-packages/PIL \
/usr/local/lib/python3.12/dist-packages/pillow.libs \
/usr/local/lib/python3.12/dist-packages/pillow-*.dist-info \
/usr/local/lib/python3.12/dist-packages/mistune \
/usr/local/lib/python3.12/dist-packages/mistune-*.dist-info \
/usr/local/lib/python3.12/dist-packages/soupsieve \
Expand Down