Download docker/Dockerfile.internal from Therat08/Training2: direct link, hf CLI and curl.
- Browser
- Download file 3.16 kB
-
https://huggingface.co/Therat08/Training2/resolve/main/docker/Dockerfile.internal
- Command line
-
hf download hf://Therat08/Training2/docker/Dockerfile.internal
-
curl -L -o Dockerfile.internal https://huggingface.co/Therat08/Training2/resolve/main/docker/Dockerfile.internal
3.16 kB
| # Copyright 2025 The HuggingFace Inc. team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # This Dockerfile is designed for HuggingFace internal CI environments | |
| # that require GPU access. It starts from an NVIDIA CUDA base image. | |
| # docker build -f docker/Dockerfile.internal -t lerobot-internal . | |
| # Configure the base image for CI with GPU access | |
| ARG CUDA_VERSION=12.8.1 | |
| ARG OS_VERSION=24.04 | |
| FROM nvidia/cuda:${CUDA_VERSION}-base-ubuntu${OS_VERSION} | |
| # Define Python version argument | |
| ARG PYTHON_VERSION=3.12 | |
| # Configure environment variables | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| MUJOCO_GL=egl \ | |
| PATH=/lerobot/.venv/bin:$PATH \ | |
| CUDA_VISIBLE_DEVICES=0 \ | |
| TEST_TYPE=single_gpu \ | |
| DEVICE=cuda | |
| # Install Python, system dependencies, and uv (as root) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential git curl \ | |
| libglib2.0-0 libgl1 libegl1 ffmpeg \ | |
| libusb-1.0-0-dev speech-dispatcher libgeos-dev portaudio19-dev \ | |
| cmake pkg-config ninja-build \ | |
| python${PYTHON_VERSION} \ | |
| python${PYTHON_VERSION}-venv \ | |
| python${PYTHON_VERSION}-dev \ | |
| && curl -LsSf https://astral.sh/uv/install.sh | sh \ | |
| && mv /root/.local/bin/uv /usr/local/bin/uv \ | |
| && useradd --create-home --shell /bin/bash user_lerobot \ | |
| && usermod -aG sudo user_lerobot \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| # Create application directory and set permissions | |
| WORKDIR /lerobot | |
| RUN chown -R user_lerobot:user_lerobot /lerobot | |
| # Switch to the non-root user | |
| USER user_lerobot | |
| # Environment variables for the testing | |
| ENV HOME=/home/user_lerobot \ | |
| HF_HOME=/home/user_lerobot/.cache/huggingface \ | |
| HF_LEROBOT_HOME=/home/user_lerobot/.cache/huggingface/lerobot \ | |
| TORCH_HOME=/home/user_lerobot/.cache/torch \ | |
| TRITON_CACHE_DIR=/home/user_lerobot/.cache/triton | |
| # Create the virtual environment | |
| # We use a virtual environment inside the container—even though the container itself \ | |
| # provides isolation—to ensure compatibility with the cluster and to prevent \ | |
| # issues with MuJoCo and OpenGL drivers. | |
| RUN uv venv --python python${PYTHON_VERSION} | |
| # Install Python dependencies for caching | |
| COPY --chown=user_lerobot:user_lerobot setup.py pyproject.toml uv.lock README.md MANIFEST.in ./ | |
| COPY --chown=user_lerobot:user_lerobot src/ src/ | |
| RUN uv sync --locked --extra all --no-cache | |
| RUN chmod +x /lerobot/.venv/lib/python${PYTHON_VERSION}/site-packages/triton/backends/nvidia/bin/ptxas | |
| # Copy the rest of the application source code | |
| # Make sure to have the git-LFS files for testing | |
| COPY --chown=user_lerobot:user_lerobot . . | |
| # Set the default command | |
| CMD ["/bin/bash"] | |