FROM nvidia/cuda:12.6.1-cudnn-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=1 ENV PIP_NO_CACHE_DIR=1 ENV GRADIO_SERVER_NAME=0.0.0.0 ENV GRADIO_SERVER_PORT=7860 ENV MPLCONFIGDIR=/tmp/matplotlib ENV HF_HOME=/tmp/.huggingface WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ python3 \ python3-pip \ python3-dev \ python3-venv \ ffmpeg \ git \ && ln -sf /usr/bin/python3 /usr/bin/python \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/requirements.txt RUN python -m pip install --upgrade pip==24.3.1 setuptools==75.8.0 wheel==0.45.1 && \ pip install --no-cache-dir \ torch==2.8.0 torchaudio==2.8.0 torchvision==0.23.0 \ --index-url https://download.pytorch.org/whl/cu126 && \ pip install --no-cache-dir -r /app/requirements.txt COPY app.py /app/app.py COPY README.md /app/README.md EXPOSE 7860 CMD ["python", "app.py"]