wisdom_py / Dockerfile
21wisdom's picture
Update Dockerfile
072f720 verified
Raw History Blame Contribute Delete
790 Bytes
# 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"]