File size: 790 Bytes
86a8165 072f720 86a8165 3e6a996 86a8165 3e6a996 | 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 | # HuggingFace Spaces โ ๋
ธ์ฝ๋ฉ Python+ ๋ฐฐํฌ์ฉ
FROM python:3.11-slim
# ํ๊ธ ํฐํธ ๋ฐ ๊ธฐ๋ณธ ํจํค์ง ์ค์น
RUN apt-get update && apt-get install -y \
fonts-nanum \
fontconfig \
&& fc-cache -fv \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Python ํจํค์ง ๋จผ์ ์ค์น (์บ์ ํ์ฉ)
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# ์ฑ ํ์ผ ์ ์ฒด ๋ณต์ฌ
COPY . .
# static/ ํด๋ ์์ฑ ํ ํ์ผ ์ด๋ (๋ฃจํธ์ ์
๋ก๋๋ ๊ฒฝ์ฐ ๋์)
RUN mkdir -p static uploads results && \
for f in app.js index.html style.css; do \
[ -f "$f" ] && mv "$f" static/ || true; \
done
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |