Spaces:
Running on L40S
Running on L40S
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: OpenMDW-1.1 | |
| ARG BASE_VERSION=26.02 | |
| ARG BASE_IMAGE=nvcr.io/nvidia/pytorch:${BASE_VERSION}-py3 | |
| FROM ${BASE_IMAGE} | |
| # Set the DEBIAN_FRONTEND environment variable to avoid interactive prompts during apt operations. | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install packages | |
| RUN --mount=type=cache,target=/var/cache/apt \ | |
| --mount=type=cache,target=/var/lib/apt \ | |
| apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| curl \ | |
| ffmpeg \ | |
| git-lfs \ | |
| gpg \ | |
| tree \ | |
| wget | |
| # Overwrite base image uv: https://docs.astral.sh/uv/getting-started/installation/ | |
| # https://github.com/astral-sh/uv-docker-example/blob/main/Dockerfile | |
| COPY --from=ghcr.io/astral-sh/uv:0.10.8 /uv /uvx /usr/local/bin/ | |
| # Copy from the cache instead of linking since it's a mounted volume | |
| ENV UV_LINK_MODE=copy | |
| # Cache python downloads | |
| ENV UV_SYSTEM_PYTHON=true | |
| ENV UV_BREAK_SYSTEM_PACKAGES=true | |
| # Install just: https://just.systems/man/en/pre-built-binaries.html | |
| RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin --tag 1.46.0 | |
| ENV PATH="/root/.local/bin:$PATH" | |
| # Install into system environment | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ | |
| uv pip install -r pyproject.toml --all-extras | |
| ENTRYPOINT ["/workspace/docker/entrypoint.sh"] | |
| CMD ["/bin/bash"] | |