-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fixes isaaclab
scripts to deal with Isaac Sim pip installation
#631
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
Merged
Merged
Changes from 13 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a63d97e
adds initial fix
Mayankm96 c739249
working setup without env file
Mayankm96 d09fff0
works without any other code
Mayankm96 9d92b49
runs formatter
Mayankm96 f568db5
runs formatter
Mayankm96 0327c3a
fix scripts to use isaacsim pip paths
Mayankm96 acbda9a
gets path correclty
Mayankm96 1234de4
checks steps for bash
Mayankm96 08a57cf
adds dockerfile for pip installation
Mayankm96 43682be
adds python in pip dockerfile
Mayankm96 ce363cc
fixes docs
Mayankm96 c51cce3
fixes vscode setup on launch
Mayankm96 c85f119
runs formatter
Mayankm96 682882b
fixes based on kelly
Mayankm96 df24b93
adds throwing error for wrong python version
Mayankm96 ea93778
Merge branch 'main' into fix/isaaclab-script
Mayankm96 2cc68fe
Merge branch 'main' into fix/isaaclab-script
Mayankm96 cc26f0a
fix backslash in paths
kellyguo11 d7881ce
Merge branch 'fix/isaaclab-script' of github.com:isaac-sim/IsaacLab i…
kellyguo11 bdd772e
makes yq installation not mandatory
Mayankm96 1cc8e21
simplify logic in windows
Mayankm96 64d928b
deals with docker container cases
Mayankm96 0be5e7e
fixes for windows script
kellyguo11 5d050c6
deals with corner cases
Mayankm96 467c272
runs formatter
Mayankm96 bff56ae
adds back vscode setting
Mayankm96 07a6ea4
runs formatter
Mayankm96 a496c29
better warning
Mayankm96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Copyright (c) 2022-2024, The Isaac Lab Project Developers. | ||
# All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
# This Dockerfile is used to build a Docker image for the Isaac Lab framework. | ||
# | ||
# It uses the pip package manager to install Isaac Sim and the Isaac Lab framework. | ||
# | ||
# To build the Docker image and run the Docker container, follow the steps below: | ||
# | ||
# 1. Build the Docker image: | ||
# docker build -t isaac-lab:latest -f docker/Dockerfile.pip . | ||
# 2. Run the Docker container: | ||
# docker run -it --gpus all --rm --network=host --name isaac-lab -v $(pwd):/root/isaaclab isaac-lab:latest | ||
|
||
# Base image: Ubuntu 22.04 | ||
FROM ubuntu:22.04 AS base | ||
|
||
# Set default RUN shell to bash | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Adds labels to the Dockerfile | ||
LABEL version="1.0" | ||
LABEL description="Dockerfile for building and running the Isaac Lab framework in Ubuntu 22.04 container image." | ||
|
||
# Arguments | ||
# Path to the Isaac Lab directory | ||
ENV ISAACLAB_PATH=/root/isaaclab | ||
# Home dir of docker user, typically '/root' | ||
ENV DOCKER_USER_HOME=/root | ||
|
||
# Set environment variables | ||
ENV LANG=C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
USER root | ||
|
||
# Install dependencies and remove cache | ||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
cmake \ | ||
git \ | ||
libglib2.0-0 \ | ||
ncurses-term && \ | ||
apt -y autoremove && apt clean autoclean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# for singularity usage, have to create the directories that will binded | ||
RUN mkdir -p ${DOCKER_USER_HOME}/.cache/ov && \ | ||
mkdir -p ${DOCKER_USER_HOME}/.cache/pip && \ | ||
mkdir -p ${DOCKER_USER_HOME}/.cache/nvidia/GLCache && \ | ||
mkdir -p ${DOCKER_USER_HOME}/.nv/ComputeCache && \ | ||
mkdir -p ${DOCKER_USER_HOME}/.nvidia-omniverse/logs && \ | ||
mkdir -p ${DOCKER_USER_HOME}/.local/share/ov/data && \ | ||
mkdir -p ${DOCKER_USER_HOME}/Documents | ||
|
||
# for singularity usage, create NVIDIA binary placeholders | ||
RUN touch /bin/nvidia-smi && \ | ||
touch /bin/nvidia-debugdump && \ | ||
touch /bin/nvidia-persistenced && \ | ||
touch /bin/nvidia-cuda-mps-control && \ | ||
touch /bin/nvidia-cuda-mps-server && \ | ||
touch /etc/localtime && \ | ||
mkdir -p /var/run/nvidia-persistenced && \ | ||
touch /var/run/nvidia-persistenced/socket | ||
|
||
# Install python3 and pip | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3 \ | ||
python3-pip && \ | ||
apt -y autoremove && apt clean autoclean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
# Maintain python3 as the default python version | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 | ||
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 | ||
|
||
# Install python packages | ||
RUN pip3 install --no-cache-dir --upgrade pip && \ | ||
pip install torch==2.2.2 --index-url https://download.pytorch.org/whl/cu118 | ||
|
||
RUN pip install isaacsim-rl isaacsim-replicator isaacsim-extscache-physics isaacsim-extscache-kit-sdk isaacsim-extscache-kit isaacsim-app --extra-index-url https://pypi.nvidia.com | ||
|
||
# Mount the Isaac Lab directory (files to exclude are defined in .dockerignore) | ||
COPY ../ ${ISAACLAB_PATH} | ||
|
||
# installing Isaac Lab dependencies | ||
# use pip caching to avoid reinstalling large packages | ||
RUN --mount=type=cache,target=${DOCKER_USER_HOME}/.cache/pip \ | ||
${ISAACLAB_PATH}/isaaclab.sh --install | ||
|
||
# aliasing isaaclab.sh and python for convenience | ||
RUN echo "export ISAACLAB_PATH=${ISAACLAB_PATH}" >> ${HOME}/.bashrc && \ | ||
echo "alias isaaclab=${ISAACLAB_PATH}/isaaclab.sh" >> ${HOME}/.bashrc && \ | ||
echo "export TZ=$(date +%Z)" >> ${HOME}/.bashrc | ||
|
||
# make working directory as the Isaac Lab directory | ||
# this is the default directory when the container is run | ||
WORKDIR ${ISAACLAB_PATH} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.. _isaacsim-binaries-installation: | ||
|
||
|
||
Installation using Isaac Sim Binaries | ||
===================================== | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.