-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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 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,55 +1,34 @@ | ||
FROM isaac-sim-ros2:humble-4.0.0 | ||
|
||
# Set working directory to root | ||
WORKDIR / | ||
# 빌드 인자 선언 | ||
ARG USERNAME | ||
ARG USERPASSWORD | ||
|
||
# Update apt-get and install necessary packages | ||
# Update apt-get, install necessary packages, and set up build tools | ||
RUN apt-get update && \ | ||
apt-get install -y git curl git-lfs cmake && \ | ||
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 | ||
apt-get install -y \ | ||
git curl git-lfs cmake \ | ||
build-essential gcc g++ sudo wget unzip software-properties-common python3-pip && \ | ||
git lfs install && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# pull lfs files in StrideSim | ||
WORKDIR /StrideSim | ||
|
||
RUN git lfs fetch && \ | ||
git lfs pull | ||
RUN git clone https://github.com/isaac-sim/IsaacLab.git -b v1.0.0 | ||
|
||
# Set up IsaacLab | ||
WORKDIR /IsaacLab | ||
RUN TERM=xterm-256color ln -s /isaac-sim _isaac_sim && \ | ||
TERM=xterm-256color /bin/bash -c "./isaaclab.sh --install" | ||
|
||
# Create symbolic link | ||
RUN ln -s /isaac-sim _isaac_sim | ||
|
||
# Install IsaacLab | ||
ENV TERM=xterm-256color | ||
RUN /bin/bash -c "./isaaclab.sh --install" | ||
RUN useradd -m $USERNAME | ||
|
||
# Set up StrideSim | ||
WORKDIR /StrideSim/rl | ||
# 인자로 받은 USERPASSWORD 로 비밀번호 설정 | ||
RUN echo "$USERNAME:$USERPASSWORD" | chpasswd | ||
|
||
RUN apt-get install -y python3-pip | ||
RUN usermod -aG sudo $USERNAME | ||
|
||
# Create symbolic link for python3 to python | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
|
||
RUN /bin/bash -c "python -m pip install -e ." | ||
|
||
WORKDIR /isaac-sim | ||
|
||
# Create a non-root admin user | ||
RUN useradd -m -s /bin/bash -G sudo user && \ | ||
echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \ | ||
chown -R user:user /isaac-sim /StrideSim /IsaacLab | ||
|
||
# Switch to user | ||
USER user | ||
USER $USERNAME | ||
WORKDIR / | ||
|
||
# Set default shell to bash | ||
SHELL ["/bin/bash", "-c"] | ||
SHELL ["/bin/bash", "-c"] |
This file contains 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