File size: 706 Bytes
1361a1e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6cf241f
 
 
 
 
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
# ---- base image ----
FROM python:3.11-slim

# Make output unbuffered (logs show up immediately)
ENV PYTHONUNBUFFERED=1

# Create app directory
WORKDIR /app

# Install system deps only if you need them (uncomment as needed)
# RUN apt-get update && apt-get install -y --no-install-recommends \
#     build-essential && \
#     rm -rf /var/lib/apt/lists/*

# ---- python deps ----
# Install Python deps first for better layer caching
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# ---- app code ----
COPY . /app

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["gunicorn","-b","0.0.0.0:7860","app:app"]