Skip to content

Commit f9ad415

Browse files
committed
fix: fix home dir for training image
Signed-off-by: anubhutiv <anubhutiv@nvidia.com>
1 parent 076bdd5 commit f9ad415

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docker/rl/Dockerfile.nmp-rl-training

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,13 @@ RUN bash /app/docker/scripts/remove-listed-files.sh /app/docker/rl/codec-file-re
8585
# Point runtime uv writes at the per-user cache instead, which is already owned by USER_UID above.
8686
# The prefetched venvs are unaffected: their symlinks are absolute /opt/uv_cache paths resolved at
8787
# build time, so changing UV_CACHE_DIR only redirects FUTURE uv operations.
88+
# HOME must follow the runtime user. The base sets HOME=/home/nmp-build for its build user
89+
# (uid 2000) and that value survives into the published image, but this stage runs as
90+
# ${USER_UID}, which cannot write there. Anything resolving `~` at import time then dies:
91+
# swanlab, which nemo_rl.utils.logger imports unconditionally, calls os.mkdir("~/.swanlab")
92+
# from its module body, so the GRPO driver fails before reading a config.
8893
ENV PATH="/opt/nemo_rl_venv/bin:${PATH}" \
94+
HOME=/home/${USERNAME} \
8995
UV_CACHE_DIR=/home/${USERNAME}/.cache/uv
9096
ENTRYPOINT ["/opt/venv/bin/python"]
9197
CMD ["-m", "nmp.rl.tasks.training", "--help"]

0 commit comments

Comments
 (0)