mcq / Dockerfile
puzan789's picture
Added
775ba42
raw
history blame contribute delete
476 Bytes
# Use official Python image
FROM python:3.10-slim
# Set work directory
WORKDIR /app
# Copy requirements
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY . .
# Expose port (Hugging Face Spaces expects 7860 or 8000, but FastAPI default is 8000)
EXPOSE 7860
# Start FastAPI with uvicorn on port 7860 for Hugging Face Spaces
CMD ["uvicorn", "app.api.routes:router", "--host", "0.0.0.0", "--port", "7860"]