File size: 1,647 Bytes
9f818c5
d276e9d
 
9f818c5
 
 
d276e9d
 
9f818c5
 
d276e9d
9f818c5
 
 
 
 
 
 
 
d276e9d
 
 
9f818c5
 
d276e9d
 
 
5abff68
9f818c5
 
 
5abff68
 
 
 
 
9f818c5
 
 
 
5abff68
 
 
d276e9d
5abff68
d276e9d
9f818c5
127c55e
d276e9d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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"]