66 lines
1.8 KiB
Docker
66 lines
1.8 KiB
Docker
|
# Use the Nvidia base image
|
||
|
FROM nvidia/cudagl:11.3.1-devel-ubuntu20.04
|
||
|
ENV NVIDIA_DRIVER_CAPABILITIES=all
|
||
|
ARG PYTHON_VERSION=3.10
|
||
|
|
||
|
# Install os-level packages
|
||
|
RUN apt-get update && \
|
||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||
|
bash-completion \
|
||
|
build-essential \
|
||
|
ca-certificates \
|
||
|
cmake \
|
||
|
curl \
|
||
|
git \
|
||
|
git-lfs \
|
||
|
htop \
|
||
|
libegl1 \
|
||
|
libxext6 \
|
||
|
libjpeg-dev \
|
||
|
libpng-dev \
|
||
|
libvulkan1 \
|
||
|
rsync \
|
||
|
tmux \
|
||
|
unzip \
|
||
|
vim \
|
||
|
vulkan-utils \
|
||
|
wget \
|
||
|
xvfb \
|
||
|
libglib2.0-0 \
|
||
|
libgl1-mesa-glx \
|
||
|
libegl1-mesa \
|
||
|
ffmpeg \
|
||
|
build-essential \
|
||
|
cmake \
|
||
|
portaudio19-dev \
|
||
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
||
|
# Install (mini) conda
|
||
|
RUN curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
||
|
chmod +x ~/miniconda.sh && \
|
||
|
~/miniconda.sh -b -p /opt/conda && \
|
||
|
rm ~/miniconda.sh && \
|
||
|
/opt/conda/bin/conda init && \
|
||
|
/opt/conda/bin/conda install -y python="$PYTHON_VERSION" && \
|
||
|
/opt/conda/bin/conda clean -ya
|
||
|
|
||
|
ENV PATH=/opt/conda/bin:$PATH
|
||
|
SHELL ["/bin/bash", "-c"]
|
||
|
|
||
|
# https://github.com/haosulab/ManiSkill/issues/9
|
||
|
# Install Poetry
|
||
|
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||
|
ENV PATH="/root/.local/bin:${PATH}"
|
||
|
# Copy Vulkan JSON files
|
||
|
COPY docker/manyskill-lerobot-gpu/nvidia_icd.json /usr/share/vulkan/icd.d/nvidia_icd.json
|
||
|
COPY docker/manyskill-lerobot-gpu/nvidia_layers.json /etc/vulkan/implicit_layer.d/nvidia_layers.json
|
||
|
|
||
|
# Install LeRobot
|
||
|
COPY . /lerobot
|
||
|
WORKDIR /lerobot
|
||
|
RUN poetry install --sync --all-extras
|
||
|
RUN pip install --upgrade mani-skill==3.0.0.b15 && pip cache purge
|
||
|
|
||
|
# Download PhysX GPU binary
|
||
|
RUN python -c "exec('import sapien.physx as physx;\ntry:\n physx.enable_gpu()\nexcept:\n pass;')"
|