Skip to content

Commit

Permalink
feat: docker file!
Browse files Browse the repository at this point in the history
  • Loading branch information
mqjinwon committed Oct 30, 2024
1 parent 4484836 commit 8d346e3
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ RUN apt-get update && \
apt-get install -y git curl git-lfs cmake vim gedit && \
git lfs install

# install build tools
RUN apt-get install -y build-essential gcc g++ sudo wget unzip software-properties-common

# Clone the required repositories
RUN git clone https://github.com/AuTURBO/StrideSim.git && \
git clone https://github.com/isaac-sim/IsaacLab.git -b v1.0.0
Expand All @@ -19,14 +22,14 @@ RUN git lfs fetch && \
git lfs pull

# Install ROS 2 Humble
# RUN apt-get update && apt-get install -y locales software-properties-common && \
# locale-gen en_US en_US.UTF-8 && \
# update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
# add-apt-repository universe && \
# curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
# echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" > /etc/apt/sources.list.d/ros2.list && \
# apt-get update && \
# apt-get install -y ros-humble-desktop
RUN apt-get update && apt-get install -y locales software-properties-common && \
locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
add-apt-repository universe && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" > /etc/apt/sources.list.d/ros2.list && \
apt-get update && \
apt-get install -y ros-humble-desktop

# Install Miniconda (latest version)
WORKDIR /
Expand All @@ -45,15 +48,27 @@ WORKDIR /IsaacLab
# Create symbolic link
RUN ln -s /isaac-sim _isaac_sim

# Initialize conda
RUN /bin/bash -c "source /opt/miniconda/etc/profile.d/conda.sh"

# Run conda setup
RUN /bin/bash -c "./isaaclab.sh --conda"

# Initialize conda and activate environment in the same RUN command
RUN /bin/bash -c "source /opt/miniconda/etc/profile.d/conda.sh && \
conda init bash && \
conda activate isaaclab"

# Install IsaacLab
RUN /bin/bash -c "./isaaclab.sh --install"

# Set up StrideSim
WORKDIR /StrideSim/rl
RUN python -m pip install -e .
RUN /bin/bash -c "source /opt/miniconda/etc/profile.d/conda.sh && \
conda activate isaaclab && \
python -m pip install -e ."

WORKDIR /isaac-sim

# Add conda environment activation to bashrc
RUN echo "source /opt/miniconda/etc/profile.d/conda.sh && conda activate isaaclab" >> ~/.bashrc

# Set default shell to bash
SHELL ["/bin/bash", "-c"]

0 comments on commit 8d346e3

Please sign in to comment.