File size: 873 Bytes
ec5d195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

WORKDIR /app

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    git \
    build-essential \
    && apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade pip

RUN pip install --no-cache-dir torch==2.1.0 torchvision==0.16.0

RUN pip install --no-cache-dir \
    einops==0.7.0 \
    opencv-python-headless==4.8.1.78 \
    Pillow==10.1.0 \
    gradio==4.8.0 \
    numpy==1.24.3 \
    huggingface_hub==0.19.4

RUN git clone --depth 1 https://github.com/NVIDIA/Cosmos-Tokenizer.git /tmp/Cosmos-Tokenizer

RUN cd /tmp/Cosmos-Tokenizer && pip install --no-cache-dir -e .

RUN python -c "from cosmos_tokenizer.video_lib import CausalVideoTokenizer; print('OK')"

COPY . .

ENV PYTHONUNBUFFERED=1
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860

EXPOSE 7860

CMD ["python", "app.py"]