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"]