# CUDA base image (safe for bitsandbytes) FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=1 # System deps RUN apt-get update && apt-get install -y \ python3 \ python3-pip \ git \ curl \ && rm -rf /var/lib/apt/lists/* # Symlink python RUN ln -s /usr/bin/python3 /usr/bin/python WORKDIR /app # Install Python deps COPY requirements.txt . RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt # Copy app COPY app.py . # Hugging Face cache (optional but recommended) ENV HF_HOME=/app/.hf_cache EXPOSE 8000 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]