File size: 852 Bytes
c7e9f96 |
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 32 33 34 35 |
FROM python:3.11-slim
WORKDIR /app
# 1. ์์คํ
ํจํค์ง ์ค์น
RUN apt-get update && apt-get install -y \
build-essential \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# 2. Python ์์กด์ฑ ์ค์น
COPY requirements.txt .
# ๐ฅ [์ฉ๋ ์ต์ ํ] ๋ฌด๊ฑฐ์ด PyTorch๋ฅผ CPU ์ ์ฉ์ผ๋ก ๋จผ์ ์ค์นํฉ๋๋ค.
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
# ๋๋จธ์ง ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น (--no-cache-dir ์ ์ง)
RUN pip install --no-cache-dir -r requirements.txt
# 3. ์ ํ๋ฆฌ์ผ์ด์
์ฝ๋ ๋ณต์ฌ
COPY . .
# ํ์ํ ๋๋ ํ ๋ฆฌ ์์ฑ
RUN mkdir -p instance uploads vector_db knowledge_graphs logs static templates
# 4. ํฌํธ ์ค์ ๋ฐ ํ๊ฒฝ ๋ณ์
EXPOSE 7860
ENV PORT=7860
ENV HOST=0.0.0.0
# 5. ์ ํ๋ฆฌ์ผ์ด์
์คํ (app.py ์ง์ ์คํ)
CMD ["python", "app.py"]
|