-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Modifies ROOT user related setup to Dockerfile.curobo #5376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 4 commits
182a9df
3f9dfbe
b0643e4
61f1fd7
7d5bf6d
fc7c605
02a97eb
e0e7b86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,8 @@ ENV DOCKER_USER_HOME=${DOCKER_USER_HOME_ARG} | |
| ENV LANG=C.UTF-8 | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Base image ends with USER isaac-sim (uid 1234); switch to root for | ||
| # system-level setup (apt, cuda, /bin/nvidia-* placeholders, etc.). | ||
| USER root | ||
|
|
||
| # Install dependencies | ||
|
|
@@ -145,9 +147,26 @@ RUN rm -rf ${ISAACSIM_ROOT_PATH}/kit/python/lib/python3.12/site-packages/pip* && | |
| ${ISAACLAB_PATH}/_isaac_sim/kit/python/bin/python3 get-pip.py && \ | ||
| rm get-pip.py | ||
|
|
||
| # Create a non-root runtime user with uid 1000 to match the CI runner host | ||
| # user that owns the bind-mounted /workspace/isaaclab. Without this match, | ||
| # runtime `mkdir tests` etc. fail with EACCES on the bind-mount overlay. | ||
| # The base image already provisions an isaac-sim user (uid 1234) which keeps | ||
| # ownership of /isaac-sim; we only chown the paths the new user needs to | ||
| # write to so we don't trigger an OverlayFS copy-up of the multi-GB Isaac | ||
| # Sim install. /isaac-sim stays mode 755 so isaaclab can still read+exec it. | ||
| RUN useradd -ms /bin/bash -l --uid 1000 isaaclab -d /home/isaaclab | ||
|
|
||
| RUN chown -R isaaclab:isaaclab \ | ||
| ${ISAACLAB_PATH} \ | ||
| ${ISAACSIM_ROOT_PATH}/kit/python/lib/python3.12/site-packages \ | ||
| ${DOCKER_USER_HOME} \ | ||
| /home/isaaclab | ||
|
|
||
| USER isaaclab | ||
|
njawale42 marked this conversation as resolved.
Outdated
|
||
|
|
||
| # installing Isaac Lab dependencies | ||
| # use pip caching to avoid reinstalling large packages | ||
| RUN --mount=type=cache,target=${DOCKER_USER_HOME}/.cache/pip \ | ||
| RUN --mount=type=cache,target=${DOCKER_USER_HOME}/.cache/pip,uid=1000,gid=1000 \ | ||
| ${ISAACLAB_PATH}/isaaclab.sh --install | ||
|
Comment on lines
+191
to
192
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After The mount target should follow the user's actual RUN --mount=type=cache,target=/home/isaaclab/.cache/pip,uid=1000,gid=1000 \
${ISAACLAB_PATH}/isaaclab.sh --installIf keeping |
||
|
|
||
| # HACK: Uninstall quadprog as it causes issues with some reinforcement learning frameworks | ||
|
|
@@ -169,11 +188,11 @@ RUN echo "export ISAACLAB_PATH=${ISAACLAB_PATH}" >> ${HOME}/.bashrc && \ | |
| echo "alias pip3='${ISAACLAB_PATH}/_isaac_sim/python.sh -m pip'" >> ${HOME}/.bashrc && \ | ||
| echo "alias tensorboard='${ISAACLAB_PATH}/_isaac_sim/python.sh ${ISAACLAB_PATH}/_isaac_sim/tensorboard'" >> ${HOME}/.bashrc && \ | ||
| echo "export TZ=$(date +%Z)" >> ${HOME}/.bashrc && \ | ||
| echo "shopt -s histappend" >> /root/.bashrc && \ | ||
| echo "PROMPT_COMMAND='history -a'" >> /root/.bashrc | ||
| echo "shopt -s histappend" >> ${HOME}/.bashrc && \ | ||
| echo "PROMPT_COMMAND='history -a'" >> ${HOME}/.bashrc | ||
|
|
||
| # copy the rest of the files | ||
| COPY ../ ${ISAACLAB_PATH}/ | ||
| COPY --chown=isaaclab:isaaclab ../ ${ISAACLAB_PATH}/ | ||
|
|
||
| # make working directory as the Isaac Lab directory | ||
| # this is the default directory when the container is run | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python3.12is hard-coded in thechownpath. If the upstream Isaac Sim base image ships Python 3.13 (or any other version), this path won't exist and theRUN chown -Rlayer will fail at build time with "No such file or directory," breaking the entire image build.Use a glob or a shell expansion to resolve the versioned directory dynamically: