FROM nvidia/cuda:11.7.1-runtime-ubuntu22.04 # Set up system RUN apt-get update && apt-get install -y \ python3-pip \ python3-dev \ git \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /code # Copy requirements first to leverage Docker cache COPY requirements.txt . # Install dependencies RUN pip3 install --no-cache-dir -r requirements.txt # Copy the rest of the application COPY . . # Set environment variables ENV PYTHONUNBUFFERED=1 ENV GRADIO_SERVER_NAME=0.0.0.0 ENV GRADIO_SERVER_PORT=7860 # Command to run the application CMD ["python3", "app.py"]