Spaces:
Running on L40S
Running on L40S
Download Dockerfile from nvidia/Cosmos3-Action-Viewer: direct link, hf CLI and curl.
- Browser
- Download file 1.65 kB
-
https://huggingface.co/spaces/nvidia/Cosmos3-Action-Viewer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/nvidia/Cosmos3-Action-Viewer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/nvidia/Cosmos3-Action-Viewer/resolve/main/Dockerfile
1.65 kB
| FROM nvcr.io/nvidia/pytorch:25.11-py3 | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| VIRTUAL_ENV=/opt/action-viz-venv \ | |
| PATH=/opt/action-viz-venv/bin:$PATH \ | |
| PORT=7860 \ | |
| COSMOS_VIEWER_SHARE=0 \ | |
| COSMOS_TRAINING=0 \ | |
| COSMOS_INTERNAL=0 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| HF_HUB_DISABLE_XET=1 \ | |
| ACTION_VIZ_APP_DATA_ROOT=/app_data \ | |
| ACTION_VIZ_OUTPUT_ROOT=/tmp/action_viz_sessions \ | |
| ACTION_VIZ_GENERATE_IMAGE_SIZE=480 \ | |
| ACTION_VIZ_GENERATE_NUM_FRAMES=24 \ | |
| ACTION_VIZ_GENERATE_NUM_STEPS=30 \ | |
| ACTION_VIZ_PERSISTENT_RUNNER=1 \ | |
| PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git curl ca-certificates ffmpeg build-essential linux-libc-dev \ | |
| libgl1 libglib2.0-0 libegl1 libosmesa6 libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY --chown=ubuntu:ubuntu requirements.txt /app/requirements.txt | |
| RUN python -m venv /opt/action-viz-venv \ | |
| && python -m pip install --upgrade pip uv \ | |
| && uv pip install --python /opt/action-viz-venv/bin/python -r /app/requirements.txt | |
| COPY --chown=ubuntu:ubuntu cosmos-framework /app/cosmos-framework | |
| RUN uv pip install --python /opt/action-viz-venv/bin/python --no-deps --no-build-isolation \ | |
| -e /app/cosmos-framework \ | |
| -e /app/cosmos-framework/packages/diffusers-cosmos3 \ | |
| -e /app/cosmos-framework/packages/transformers-cosmos3 | |
| COPY --chown=ubuntu:ubuntu assets /app/assets | |
| COPY --chown=ubuntu:ubuntu scripts /app/scripts | |
| COPY --chown=ubuntu:ubuntu start.sh /app/start.sh | |
| RUN install -d -o ubuntu -g ubuntu /app_data | |
| USER ubuntu | |
| CMD ["bash", "/app/start.sh"] | |