Spaces:
Sleeping
Sleeping
File size: 476 Bytes
775ba42 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# 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"] |