-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile_isaac_lab_1_4_0
81 lines (73 loc) · 3.56 KB
/
Dockerfile_isaac_lab_1_4_0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# A lightweight Docker image for running Isaac Lab 1.4.0
# Please refer to the official documentation for the officlal docker usages.
FROM nvcr.io/nvidia/isaac-sim:4.2.0
# Install Conda
# Ref: https://github.com/conda-forge/miniforge-images/blob/484f385f409e75a194dbe48633d8662d389ad748/ubuntu/Dockerfile
# > Starting with the 22.11 PyTorch NGC container, miniforge is removed and all Python packages are installed in the default Python environment...
# > See: https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-01.html
ARG MINIFORGE_NAME=Miniforge3
ARG MINIFORGE_VERSION=24.3.0-0
ARG TARGETPLATFORM
ENV CONDA_DIR=/opt/conda
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH=${CONDA_DIR}/bin:${PATH}
# 1. Install just enough for conda to work
# 2. Keep $HOME clean (no .wget-hsts file), since HSTS isn't useful in this context
# 3. Install miniforge from GitHub releases
# 4. Apply some cleanup tips from https://jcrist.github.io/conda-docker-tips.html
# Particularly, we remove pyc and a files. The default install has no js, we can skip that
# 5. Activate base by default when running as any *non-root* user as well
# Good security practice requires running most workloads as non-root
# This makes sure any non-root users created also have base activated
# for their interactive shells.
# 6. Activate base by default when running as root as well
# The root user is already created, so won't pick up changes to /etc/skel
RUN apt-get update > /dev/null && \
apt-get install --no-install-recommends --yes \
wget bzip2 ca-certificates \
git \
tini \
> /dev/null && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
wget --no-hsts --quiet https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/${MINIFORGE_NAME}-${MINIFORGE_VERSION}-Linux-$(uname -m).sh -O /tmp/miniforge.sh && \
/bin/bash /tmp/miniforge.sh -b -p ${CONDA_DIR} && \
rm /tmp/miniforge.sh && \
conda clean --tarballs --index-cache --packages --yes && \
find ${CONDA_DIR} -follow -type f -name '*.a' -delete && \
find ${CONDA_DIR} -follow -type f -name '*.pyc' -delete && \
conda clean --force-pkgs-dirs --all --yes && \
echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> /etc/skel/.bashrc && \
echo ". ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate base" >> ~/.bashrc
ENTRYPOINT ["tini", "--"]
CMD [ "/bin/bash" ]
# Install and Setup Isaac Lab 1.4.0
# Ref: https://isaac-sim.github.io/IsaacLab/source/setup/installation/binaries_installation.html
RUN apt-get update \
&& apt-get install -y \
cmake \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/isaac-sim/IsaacLab.git ~/IsaacLab \
&& cd ~/IsaacLab \
&& git checkout v1.4.0
WORKDIR /root/IsaacLab
RUN ln -s /isaac-sim _isaac_sim
RUN ./isaaclab.sh --conda
RUN . /opt/conda/etc/profile.d/conda.sh \
&& conda activate isaaclab \
&& ./isaaclab.sh --install
RUN echo "conda activate isaaclab" >> ~/.bashrc
# Install ffmpeg for video recording
# Ref: https://isaac-sim.github.io/IsaacLab/source/how-to/wrap_rl_env.html#wrapper-for-recording-videos
RUN apt-get update \
&& apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Tools and scripts for Omniverse Farm
COPY thirdparty/omnicli /omnicli
COPY scripts/docker/run.sh /run.sh
# Prevent users from accidentally removing the executable permission.
RUN chmod +x /omnicli/omnicli && chmod +x /run.sh
# Prevent users from accidentally saving script files with Windows line endings.
RUN sed -i 's/\r$//' /run.sh