File size: 365 Bytes
54c2a57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# use small official image
FROM python:3.11-slim

# set workdir
WORKDIR /app

# copy only requirements first (for cache)
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

# copy code
COPY . .

# uvicorn listen on 0.0.0.0:7860 (Spaces default port)
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers"]