Skip to content

Commit 8d346e3

Browse files
committed
feat: docker file!
1 parent 4484836 commit 8d346e3

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

docker/Dockerfile

+27-12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ RUN apt-get update && \
88
apt-get install -y git curl git-lfs cmake vim gedit && \
99
git lfs install
1010

11+
# install build tools
12+
RUN apt-get install -y build-essential gcc g++ sudo wget unzip software-properties-common
13+
1114
# Clone the required repositories
1215
RUN git clone https://github.com/AuTURBO/StrideSim.git && \
1316
git clone https://github.com/isaac-sim/IsaacLab.git -b v1.0.0
@@ -19,14 +22,14 @@ RUN git lfs fetch && \
1922
git lfs pull
2023

2124
# Install ROS 2 Humble
22-
# RUN apt-get update && apt-get install -y locales software-properties-common && \
23-
# locale-gen en_US en_US.UTF-8 && \
24-
# update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
25-
# add-apt-repository universe && \
26-
# curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
27-
# 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 && \
28-
# apt-get update && \
29-
# apt-get install -y ros-humble-desktop
25+
RUN apt-get update && apt-get install -y locales software-properties-common && \
26+
locale-gen en_US en_US.UTF-8 && \
27+
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
28+
add-apt-repository universe && \
29+
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
30+
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 && \
31+
apt-get update && \
32+
apt-get install -y ros-humble-desktop
3033

3134
# Install Miniconda (latest version)
3235
WORKDIR /
@@ -45,15 +48,27 @@ WORKDIR /IsaacLab
4548
# Create symbolic link
4649
RUN ln -s /isaac-sim _isaac_sim
4750

48-
# Initialize conda
49-
RUN /bin/bash -c "source /opt/miniconda/etc/profile.d/conda.sh"
50-
5151
# Run conda setup
5252
RUN /bin/bash -c "./isaaclab.sh --conda"
5353

54+
# Initialize conda and activate environment in the same RUN command
55+
RUN /bin/bash -c "source /opt/miniconda/etc/profile.d/conda.sh && \
56+
conda init bash && \
57+
conda activate isaaclab"
58+
5459
# Install IsaacLab
5560
RUN /bin/bash -c "./isaaclab.sh --install"
5661

5762
# Set up StrideSim
5863
WORKDIR /StrideSim/rl
59-
RUN python -m pip install -e .
64+
RUN /bin/bash -c "source /opt/miniconda/etc/profile.d/conda.sh && \
65+
conda activate isaaclab && \
66+
python -m pip install -e ."
67+
68+
WORKDIR /isaac-sim
69+
70+
# Add conda environment activation to bashrc
71+
RUN echo "source /opt/miniconda/etc/profile.d/conda.sh && conda activate isaaclab" >> ~/.bashrc
72+
73+
# Set default shell to bash
74+
SHELL ["/bin/bash", "-c"]

0 commit comments

Comments
 (0)