File size: 382 Bytes
e699b35
 
 
 
 
 
 
 
 
 
 
 
 
8337448
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM python:3.10-slim

WORKDIR /code

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

# Copy the rest of the application
COPY . .

# Hugging Face Spaces dynamically assign the PORT variable, usually 7860
# Uvicorn will bind to this port
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"]