File size: 411 Bytes
301ea28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Use official lightweight Python image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Copy all project files
COPY . /app

# Install dependencies (no version pinning)
RUN pip install --no-cache-dir fastapi uvicorn pydantic

# Expose port 7860 (Hugging Face Spaces standard)
EXPOSE 7860

# Default command to run the FastAPI app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]