FROM python:3.10-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ git \ python3-dev \ && rm -rf /var/lib/apt/lists/* # Upgrade pip and install basic requirements RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir torch transformers accelerate safetensors # Copy and install requirements COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application COPY . . CMD ["python", "app.py"]