SOY NV AI
commited on
Commit
ยท
455a587
1
Parent(s):
3cee311
Fix: Remove Ollama installation and start.sh from Dockerfile for Hugging Face Spaces
Browse files- Dockerfile +6 -10
Dockerfile
CHANGED
|
@@ -2,17 +2,14 @@ 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.
|
| 13 |
-
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 14 |
-
|
| 15 |
-
# 3. Python ์์กด์ฑ ์ค์น
|
| 16 |
COPY requirements.txt .
|
| 17 |
|
| 18 |
# ๐ฅ [์ฉ๋ ์ต์ ํ] ๋ฌด๊ฑฐ์ด PyTorch๋ฅผ CPU ์ ์ฉ์ผ๋ก ๋จผ์ ์ค์นํฉ๋๋ค.
|
|
@@ -21,18 +18,17 @@ RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/wh
|
|
| 21 |
# ๋๋จธ์ง ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น (--no-cache-dir ์ ์ง)
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
-
#
|
| 25 |
COPY . .
|
| 26 |
-
RUN chmod +x start.sh
|
| 27 |
|
| 28 |
# ํ์ํ ๋๋ ํ ๋ฆฌ ์์ฑ
|
| 29 |
RUN mkdir -p instance uploads vector_db knowledge_graphs logs static templates
|
| 30 |
|
| 31 |
-
#
|
| 32 |
EXPOSE 7860
|
| 33 |
ENV PORT=7860
|
| 34 |
ENV HOST=0.0.0.0
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
CMD ["
|
| 38 |
|
|
|
|
| 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 ์ ์ฉ์ผ๋ก ๋จผ์ ์ค์นํฉ๋๋ค.
|
|
|
|
| 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 |
|