File size: 417 Bytes
9f98d47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Use the official Python image
FROM python:3.9

# Set the working directory
WORKDIR /code

# Copy the requirements and the main script
# (We install dependencies directly to keep it simple)
RUN pip install fastapi uvicorn pydantic

# Copy your main.py into the container
COPY ./main.py /code/main.py

# Hugging Face Spaces uses port 7860 by default
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]