Spaces:
Running
Running
File size: 519 Bytes
1256bd3 de54dfc 1256bd3 de54dfc 1256bd3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Use a lightweight Python image
FROM python:3.9-slim
# Create working directory
WORKDIR /app
# Copy requirements first for caching
COPY requirements.txt /app/
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy app and static files
COPY app /app/app
COPY static /app/static
# Expose port (Hugging Face Spaces typically uses 7860 by default, but you can adjust if needed)
EXPOSE 7860
# Start the app with uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|