File size: 719 Bytes
24a500b
570f7bd
b432020
cdd9515
b432020
24a500b
 
cdd9515
aa4ed26
 
b432020
 
00ff3b7
9231424
 
 
 
 
 
4287d48
b432020
 
00ff3b7
b432020
 
00ff3b7
cdd9515
cdbc665
 
 
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
FROM python:3.12-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PORT=7860 \
    GRADIO_SERVER_NAME=0.0.0.0

WORKDIR /home/user/app

# Copy requirements first
COPY requirements.txt .

RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc build-essential && \
    pip install --no-cache-dir -U pip && \
    pip install --no-cache-dir -r requirements.txt && \
    apt-get purge -y gcc build-essential && \
    apt-get autoremove -y && apt-get clean -y

# Copy full repo — but due to .dockerignore, ONLY demo.db from data/ is included
COPY . .

# Optional debug
# RUN ls -R /home/user/app/data

EXPOSE 7860

ENTRYPOINT []
CMD ["python", "-u", "start.py"]