File size: 452 Bytes
d1bda99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.11-slim
# Use a lightweight Python 3.11 base image

WORKDIR /app
# All subsequent commands run in /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install dependencies BEFORE copying code
# (Docker caches this layer — faster rebuilds)

COPY . .
# Copy all your files into the container

EXPOSE 7860
# Must match app_port in README.md

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]