FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04 # Basic deps ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y \ python3.10 python3.10-venv python3-pip git curl ffmpeg unzip \ colmap \ && rm -rf /var/lib/apt/lists/* # Create venv and install minimal deps RUN python3.10 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" RUN pip install --upgrade pip wheel # Install only essential packages first RUN pip install fastapi uvicorn python-multipart gradio # Copy app COPY app.py /app/app.py WORKDIR /app # For GPU ENV NVIDIA_VISIBLE_DEVICES=all ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility # Expose ports EXPOSE 8000 7860 # Start command CMD ["python", "app.py"]