FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=1 RUN apt-get update && apt-get install -y python3 python3-pip git && \ rm -rf /var/lib/apt/lists/* && \ ln -s /usr/bin/python3 /usr/bin/python WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . RUN useradd -m appuser && chown -R appuser /app USER appuser EXPOSE 7860 ENV GRADIO_SERVER_NAME=0.0.0.0 CMD ["python", "app.py"]