lerobot/docker/lerobot-gpu/Dockerfile

32 lines
975 B
Docker
Raw Normal View History

2024-04-25 20:58:39 +08:00
FROM nvidia/cuda:12.4.1-base-ubuntu22.04
# Configure image
ARG PYTHON_VERSION=3.10
ARG DEBIAN_FRONTEND=noninteractive
2024-04-25 20:58:39 +08:00
# Install apt dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
2025-02-02 20:59:33 +08:00
build-essential cmake git git-lfs \
2024-06-15 00:11:19 +08:00
libglib2.0-0 libgl1-mesa-glx libegl1-mesa ffmpeg \
2025-02-01 19:06:11 +08:00
speech-dispatcher libgeos-dev \
python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv \
2024-04-25 20:58:39 +08:00
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2024-04-25 20:58:39 +08:00
# Create virtual environment
RUN ln -s /usr/bin/python${PYTHON_VERSION} /usr/bin/python
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN echo "source /opt/venv/bin/activate" >> /root/.bashrc
# Install LeRobot
2025-02-02 20:59:33 +08:00
RUN git lfs install
RUN git clone https://github.com/huggingface/lerobot.git /lerobot
2024-04-25 20:58:39 +08:00
WORKDIR /lerobot
RUN pip install --upgrade --no-cache-dir pip
RUN pip install --no-cache-dir ".[test, aloha, xarm, pusht, dynamixel]"
2024-04-25 20:58:39 +08:00
# Set EGL as the rendering backend for MuJoCo
ENV MUJOCO_GL="egl"