File size: 843 Bytes
12bc4c0
 
 
 
 
 
b3c3af1
 
 
 
 
 
 
 
 
12bc4c0
 
 
 
b3c3af1
12bc4c0
 
 
 
b3c3af1
12bc4c0
 
 
 
 
b3c3af1
12bc4c0
 
 
 
4de8573
12bc4c0
b3c3af1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# --------------------
# 1️⃣ Base image
# --------------------
FROM python:3.11-slim

# --------------------
# 2️⃣ Environment
# --------------------
ENV PYTHONUNBUFFERED=1 \
    LANG=C.UTF-8 \
    LC_ALL=C.UTF-8 \
    PIP_NO_CACHE_DIR=1

# --------------------
# 3️⃣ Working directory
# --------------------
WORKDIR /app

# --------------------
# 4️⃣ Copy files
# --------------------
COPY . .

# --------------------
# 5️⃣ Upgrade pip & install dependencies
# --------------------
RUN pip install --no-cache-dir --upgrade pip \
    && pip install --no-cache-dir -r requirements.txt

# --------------------
# 6️⃣ Expose port
# --------------------
EXPOSE 7860

# --------------------
# 7️⃣ Command to run FastAPI
# --------------------
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]