File size: 503 Bytes
2a3f3b1
 
830a73a
2a3f3b1
fe6976e
 
2a3f3b1
 
 
830a73a
2a3f3b1
 
830a73a
2a3f3b1
 
830a73a
2a3f3b1
0bc4572
830a73a
2a3f3b1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Use the official lightweight Python image
FROM python:3.9-slim

# Set the working directory
WORKDIR /app

# Copy dependencies and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code
COPY . .

# Create a directory for static files (frontend) if it doesn't exist
RUN mkdir -p static

# Expose the port Hugging Face expects
EXPOSE 7860

# Run the FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]