File size: 690 Bytes
cf59a50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.12.9-slim

WORKDIR /app
COPY . .
ENV DEBIAN_FRONTEND=noninteractive
ENV MPLCONFIGDIR=/tmp/matplotlib_cache
ENV HF_HOME=/app/.huggingface_cache
ENV HUGGINGFACE_HUB_CACHE=/app/.huggingface_cache/hub
ENV PYTHONPATH "${PYTHONPATH}:/app:."
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        libgl1-mesa-glx \
        libglib2.0-0 \
        fonts-nanum* \
    && apt-get clean && \
    rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt
RUN mkdir -p /app/.huggingface_cache && chmod -R a+w /app
EXPOSE 7860
CMD ["waitress-serve", "--host=0.0.0.0", "--port=7860", "main:app"]