File size: 436 Bytes
9c72a28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM python:3.9-slim

# Copy all files into the container
COPY . /app

# Set working directory
WORKDIR /app

# Install required Python packages with Uvicorn standard for WebSocket support
RUN pip install --no-cache-dir fastapi "uvicorn[standard]" huggingface_hub

# Expose the port that Hugging Face Spaces expects (7860)
EXPOSE 7860

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