FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime WORKDIR /app ENV DEBIAN_FRONTEND=noninteractive ENV TZ=UTC RUN apt-get update && apt-get install -y \ ffmpeg \ git \ tzdata \ && rm -rf /var/lib/apt/lists/* # Install huggingface_hub first to satisfy all dependents RUN pip install --no-cache-dir "huggingface_hub==0.28.1" # Install ML stack compatible with hub 0.28.1 RUN pip install --no-cache-dir \ "torch==2.1.0" \ "diffusers==0.31.0" \ "transformers==4.45.0" \ "accelerate==0.34.0" \ sentencepiece \ "imageio[ffmpeg]" # Install gradio separately (also needs hub>=0.28.1) RUN pip install --no-cache-dir "gradio==5.23.0" COPY app.py . EXPOSE 7860 ENV GRADIO_SERVER_NAME=0.0.0.0 ENV GRADIO_SERVER_PORT=7860 CMD ["python", "app.py"]