-
Notifications
You must be signed in to change notification settings - Fork 43
Fix/rheo dockerfile #231
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: main
Are you sure you want to change the base?
Fix/rheo dockerfile #231
Changes from all commits
605576e
9850d93
24cd4c4
389fd08
e1c8e02
9095123
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,8 @@ ARG INSTALL_GROOT=false | |
| ARG WORKDIR="/workspaces" | ||
| ENV WORKDIR=${WORKDIR} | ||
| WORKDIR "${WORKDIR}" | ||
| ENV PYTHONPATH=${WORKDIR}/workflows/rheo/scripts:${WORKDIR}/workflows/rheo/scripts/simulation/rl | ||
| ENV PYTHONPATH=${WORKDIR}/workflows/rheo:${WORKDIR}/workflows/rheo/scripts:${WORKDIR}/workflows/rheo/scripts/simulation/rl | ||
| ENV HEADLESS=1 | ||
|
|
||
| USER root | ||
|
|
||
|
|
@@ -40,7 +41,10 @@ RUN apt-get update && apt-get install -y \ | |
| cmake \ | ||
| sudo \ | ||
| ffmpeg \ | ||
| python3-pip | ||
| python3-pip \ | ||
| pkg-config \ | ||
| libfreetype6-dev \ | ||
| libpng-dev | ||
|
|
||
| # Skip pip upgrade - not needed in Docker and conflicts with PEP 668 in Python 3.12 | ||
| # RUN pip3 install --upgrade pip | ||
|
|
@@ -52,40 +56,89 @@ COPY ./third_party/IsaacLab ${WORKDIR}/third_party/IsaacLab | |
| ENV ISAACLAB_PATH=${WORKDIR}/third_party/IsaacLab | ||
| ENV TERM=xterm | ||
| RUN ln -s /isaac-sim/ ${WORKDIR}/third_party/IsaacLab/_isaac_sim | ||
| # Install IsaacLab dependencies | ||
| RUN for DIR in ${WORKDIR}/third_party/IsaacLab/source/isaaclab*/; do pip install --no-deps -e "$DIR" --break-system-packages; done | ||
| # Set permissions for Isaac Sim directories that need write access | ||
| RUN chmod 777 -R /isaac-sim/ | ||
| # Pre-install flatdict into kit Python: its setup.py imports pkg_resources which | ||
| # is absent from pip's isolated build env, causing isaaclab core install to fail. | ||
| RUN /isaac-sim/python.sh -m pip install --no-build-isolation flatdict==4.0.1 | ||
| # Install isaaclab | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -i | ||
| # Verify isaaclab core was installed (isaaclab.sh silently swallows failures) | ||
| RUN /isaac-sim/python.sh -c "import isaaclab; print(isaaclab.__file__)" | ||
| # Build deps and apt packages required by Isaac Lab extensions (see IsaacLab/docker/Dockerfile.base) | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install toml | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p ${ISAACLAB_PATH}/tools/install_deps.py apt ${ISAACLAB_PATH}/source | ||
| # flatdict must be pre-installed without build isolation (pkg_resources / setuptools issue). | ||
| # Do NOT install setuptools/wheel here — it corrupts pip's vendored packaging in the kit. | ||
| # Pre-install isaaclab deps in stages with pinned wheels. Use --no-deps for packages that | ||
| # re-trigger pip matplotlib backtracking (pytransform3d, dex-retargeting) after deps exist. | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary \ | ||
| flatdict==4.0.1 \ | ||
| "numpy<2" \ | ||
| matplotlib==3.10.3 \ | ||
| scipy \ | ||
| lxml \ | ||
| pyyaml \ | ||
| anytree \ | ||
| trimesh \ | ||
| nlopt==2.7.1 \ | ||
| pin==2.7.0 \ | ||
| qpsolvers==4.8.1 \ | ||
| quadprog \ | ||
| loop-rate-limiters | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary --no-deps \ | ||
| pytransform3d==3.14.4 | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary --no-deps \ | ||
| pin-pink==3.1.0 && \ | ||
| ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary \ | ||
| daqp==0.7.2 | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary --no-deps \ | ||
| dex-retargeting==0.4.6 | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary \ | ||
| prettytable==3.3.0 \ | ||
| gymnasium==1.2.1 \ | ||
| pillow==11.3.0 \ | ||
| hidapi==0.14.0.post2 \ | ||
| starlette==0.49.1 \ | ||
| "pyglet<2" | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary "onnx>=1.18.0" | ||
|
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.
This PR newly installs |
||
| # Do NOT pip install warp-lang — Isaac Sim 5.1 ships Warp via omni.warp-1.8.2. A newer | ||
| # warp-lang from PyPI shadows the kit copy and breaks wp.types.array / wp.context at startup. | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary einops | ||
| # isaaclab_mimic runtime deps (install editable packages with --no-deps below) | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary \ | ||
| tomli ipywidgets==8.1.5 | ||
| # isaaclab / isaaclab_tasks / isaaclab_rl runtime deps skipped by --no-deps editable installs | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary \ | ||
| h5py \ | ||
| hydra-core \ | ||
| tensorboard \ | ||
| moviepy \ | ||
| numba \ | ||
| "protobuf>=4.25.8,!=5.26.0" \ | ||
| "packaging<24" | ||
|
Comment on lines
+111
to
+112
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.
This PR newly adds |
||
| # transformers omitted here — bulk install segfaults kit Python; GR00T stage installs it when needed. | ||
| # Install Isaac Lab core and extensions with --no-deps (runtime deps pre-installed above). | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --no-deps -e "${ISAACLAB_PATH}/source/isaaclab" && \ | ||
| /isaac-sim/python.sh -c "import isaaclab; print(isaaclab.__file__)" && \ | ||
| for DIR in ${WORKDIR}/third_party/IsaacLab/source/isaaclab_*/; do \ | ||
| ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --no-deps -e "$DIR" || exit 1; \ | ||
| done && \ | ||
| /isaac-sim/python.sh -c "import isaaclab; import isaaclab_mimic; print(isaaclab.__file__)" | ||
|
|
||
| # Patch for osqp | ||
| RUN if python -c "import qpsolvers; print(qpsolvers.available_solvers)" | grep -q "osqp"; then \ | ||
| RUN if /isaac-sim/python.sh -c "import qpsolvers; print(qpsolvers.available_solvers)" | grep -q "osqp"; then \ | ||
| echo "OSQP is installed."; \ | ||
| else \ | ||
| echo "OSQP missing, installing..."; \ | ||
| /isaac-sim/python.sh -m pip install --upgrade pip; \ | ||
| /isaac-sim/python.sh -m pip install qpsolvers==4.8.1; \ | ||
| fi | ||
|
|
||
| # Install pip dependencies | ||
| RUN /isaac-sim/python.sh -m pip install --upgrade pip && \ | ||
| /isaac-sim/python.sh -m pip install \ | ||
| # Workflow pip deps in one layer. Do not pin typing_extensions or install jupyter here — | ||
| # they install standalone `packaging` and break pip's vendored copy in kit Python. | ||
| # WebRTC stack (aiortc/av/aiohttp) — loaded lazily by runners when --webrtc_cam is set. | ||
| RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --no-build-isolation --prefer-binary \ | ||
| pytest \ | ||
| jupyter \ | ||
| typing_extensions==4.12.2 \ | ||
| onnxruntime | ||
|
|
||
| # lwlabs deps | ||
| RUN /isaac-sim/python.sh -m pip install --upgrade pip && \ | ||
| /isaac-sim/python.sh -m pip install \ | ||
| onnxruntime \ | ||
| vuer[all] \ | ||
| lightwheel-sdk | ||
| lightwheel-sdk \ | ||
| aiohttp \ | ||
| av==12.3.0 \ | ||
| aiortc==1.10.1 && \ | ||
| ${ISAACLAB_PATH}/isaaclab.sh -p -m pip install --force-reinstall --no-deps pip==24.3.1 | ||
|
|
||
| ENV LW_API_ENDPOINT="https://api-dev.lightwheel.net" | ||
|
|
||
|
|
@@ -191,7 +244,8 @@ RUN if [ "$INSTALL_GROOT" = "true" ]; then \ | |
| # Set CUDA 12.8 library path permanently for runtime (prepend to existing path) | ||
| ENV LD_LIBRARY_PATH=/usr/local/cuda-12.8/lib64:/usr/local/cuda/lib64:/usr/lib/x86_64-linux-gnu | ||
|
|
||
| ################################ | ||
|
|
||
| ################################# | ||
| # Install IsaacLab Arena | ||
| ################################ | ||
| COPY ./third_party/IsaacLab-Arena ${WORKDIR}/third_party/IsaacLab-Arena | ||
|
|
@@ -207,7 +261,7 @@ COPY ./third_party/RLinf ${WORKDIR}/third_party/RLinf | |
| ################################ | ||
| COPY ./workflows/rheo ${WORKDIR}/workflows/rheo | ||
|
|
||
| RUN echo "export PYTHONPATH=${WORKDIR}/workflows/rheo/scripts:${WORKDIR}/workflows/rheo/scripts/simulation/rl:\$PYTHONPATH" >> /etc/bash.bashrc | ||
| RUN echo "export PYTHONPATH=${WORKDIR}/workflows/rheo:${WORKDIR}/workflows/rheo/scripts:${WORKDIR}/workflows/rheo/scripts/simulation/rl:\$PYTHONPATH" >> /etc/bash.bashrc | ||
|
|
||
| # Set aliases | ||
| RUN echo "alias python='/isaac-sim/python.sh'" >> /etc/bash.bashrc | ||
|
|
@@ -218,6 +272,12 @@ RUN echo "alias pytest='/isaac-sim/python.sh -m pytest'" >> /etc/bash.bashrc | |
| RUN pip3 install debugpy --break-system-packages | ||
| RUN echo "alias debugpy='python -Xfrozen_modules=off -m debugpy --listen localhost:5678 --wait-for-client'" >> /etc/bash.bashrc | ||
|
|
||
| # Strip pip warp-lang after all pip installs — PyPI warp shadows omni.warp-1.8.2 and breaks Kit. | ||
| # pip uninstall fails on kit Python (cross-device link / .pyc permissions) — remove directories as root. | ||
| RUN KIT_SITE="/isaac-sim/kit/python/lib/python3.11/site-packages" && \ | ||
| chmod -R u+w "${KIT_SITE}/warp" "${KIT_SITE}/~arp" 2>/dev/null || true && \ | ||
| rm -rf "${KIT_SITE}/warp" "${KIT_SITE}"/warp_lang-*.dist-info "${KIT_SITE}"/~arp* 2>/dev/null || true | ||
|
|
||
| # Prompt | ||
| RUN echo "PS1='[RHEO] \[\e[0;32m\]~\u \[\e[0;34m\]\w\[\e[0m\] \$ '" >> /etc/bash.bashrc | ||
| RUN echo "alias ll='ls -alF --color=auto'" >> /etc/bash.bashrc | ||
|
|
||
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.
This PR explicitly pins
gymnasium==1.2.1, but whenINSTALL_GROOT=truethe GR00T stage installsgymnasium==1.0.0(line 208), which pip will downgrade to. Gymnasium 1.0.0 has API differences from 1.2.x; if any IsaacLab extension depends on 1.2-era APIs, it would fail silently with a wrong-version import at runtime.matplotlibis similarly pinned to3.10.3here and then overwritten to3.10.0in the GR00T block.