argument-backend / Dockerfile
p2002814
Fix: use /app/cache for Hugging Face models to avoid permission errors in Docker
617c3bf
raw
history blame contribute delete
612 Bytes
# Use slim Python 3.10
FROM python:3.10-slim
# Working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Expose Uvicorn port
EXPOSE 7860
# Run as root (optionnel, pas strictement nécessaire)
USER root
# Start command
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]