wiizm commited on
Commit
7f4aa86
ยท
verified ยท
1 Parent(s): dae68f3

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -34
Dockerfile CHANGED
@@ -1,34 +1,34 @@
1
- FROM python:3.11-slim
2
-
3
- WORKDIR /app
4
-
5
- # 1. ์‹œ์Šคํ…œ ํŒจํ‚ค์ง€ ์„ค์น˜
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- git \
9
- curl \
10
- && rm -rf /var/lib/apt/lists/*
11
-
12
- # 2. Python ์˜์กด์„ฑ ์„ค์น˜
13
- COPY requirements.txt .
14
-
15
- # ๐Ÿ”ฅ [์šฉ๋Ÿ‰ ์ตœ์ ํ™”] ๋ฌด๊ฑฐ์šด PyTorch๋ฅผ CPU ์ „์šฉ์œผ๋กœ ๋จผ์ € ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
16
- RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
17
-
18
- # ๋‚˜๋จธ์ง€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜ (--no-cache-dir ์œ ์ง€)
19
- RUN pip install --no-cache-dir -r requirements.txt
20
-
21
- # 3. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ฝ”๋“œ ๋ณต์‚ฌ
22
- COPY . .
23
-
24
- # ํ•„์š”ํ•œ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ
25
- RUN mkdir -p instance uploads vector_db knowledge_graphs logs static templates
26
-
27
- # 4. ํฌํŠธ ์„ค์ • ๋ฐ ํ™˜๊ฒฝ ๋ณ€์ˆ˜
28
- EXPOSE 7860
29
- ENV PORT=7860
30
- ENV HOST=0.0.0.0
31
-
32
- # 5. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์‹คํ–‰ (app.py ์ง์ ‘ ์‹คํ–‰)
33
- CMD ["python", "app.py"]
34
-
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # 1. ์‹œ์Šคํ…œ ํŒจํ‚ค์ง€ ์„ค์น˜
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ git \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # 2. Python ์˜์กด์„ฑ ์„ค์น˜
13
+ COPY requirements.txt .
14
+
15
+ # ๐Ÿ”ฅ [์šฉ๋Ÿ‰ ์ตœ์ ํ™”] ๋ฌด๊ฑฐ์šด PyTorch๋ฅผ CPU ์ „์šฉ์œผ๋กœ ๋จผ์ € ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
16
+ RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
17
+
18
+ # ๋‚˜๋จธ์ง€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜ (--no-cache-dir ์œ ์ง€)
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # 3. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ฝ”๋“œ ๋ณต์‚ฌ
22
+ COPY . .
23
+
24
+ # ํ•„์š”ํ•œ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ
25
+ RUN mkdir -p instance uploads vector_db knowledge_graphs logs static templates
26
+
27
+ # 4. ํฌํŠธ ์„ค์ • ๋ฐ ํ™˜๊ฒฝ ๋ณ€์ˆ˜
28
+ EXPOSE 7860
29
+ ENV PORT=7860
30
+ ENV HOST=0.0.0.0
31
+
32
+ # 5. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์‹คํ–‰ (app.py ์ง์ ‘ ์‹คํ–‰)
33
+ CMD ["python", "app.py"]
34
+