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"]