File size: 452 Bytes
63e1917
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use a lightweight Python image
FROM python:3.9-slim

# Set working directory
WORKDIR /code

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy app code and models
COPY app/ /code/app

# Set environment variable for Hugging Face Spaces
ENV HOST 0.0.0.0
ENV PORT 7860

# Expose port
EXPOSE 7860

# Run FastAPI app with Uvicorn
CMD ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "7860"]