# Base image with CUDA 12.8, cuDNN 9, PyTorch 2.7.0 FROM pytorch/pytorch:2.7.0-cuda12.8-cudnn9-devel # Set working directory ENV HOME=/usr/src/app WORKDIR $HOME # Install system dependencies, then clean up RUN apt-get update && \ apt-get install -y --no-install-recommends git wget && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Copy application files COPY . . # Install Python dependencies RUN pip install --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Make /usr/src/app/ a writable directory RUN chmod -R 777 $HOME # Expose the Gradio port EXPOSE 7860 ENV GRADIO_SERVER_NAME="0.0.0.0" # Start the application CMD ["python", "app.py"]