Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -6
Dockerfile
CHANGED
|
@@ -10,18 +10,24 @@ RUN apt-get update && apt-get install -y \
|
|
| 10 |
git-lfs \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# 3. ์์
๋๋ ํฐ๋ฆฌ ์ค์
|
| 14 |
WORKDIR /app
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# 4. ์์ค ์ฝ๋ ๋ณต์ฌ
|
| 17 |
COPY . /app
|
| 18 |
|
| 19 |
# 5. Git LFS ์ค์ ๋ฐ ๋์ฉ๋ ํ์ผ ๋ค์ด๋ก๋
|
| 20 |
-
RUN git lfs install &&
|
| 21 |
-
git lfs pull
|
| 22 |
-
|
| 23 |
-
# 6. ํ์ด์ฌ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น
|
| 24 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
# 7. ์คํธ๋ฆผ๋ฆฟ์ด ์ฌ์ฉํ ์ค์ ํด๋๋ฅผ ๋ฏธ๋ฆฌ ๋ง๋ค๊ณ ๊ถํ ๋ถ์ฌ (PermissionError ํด๊ฒฐ)
|
| 27 |
# ๊ถํ/๊ฒฝ๋ก ๊ณ ์
|
|
@@ -42,4 +48,5 @@ RUN mkdir -p /tmp/hf-home /tmp/hf-cache /tmp/torch-cache /tmp/xdg-cache
|
|
| 42 |
EXPOSE 8501
|
| 43 |
|
| 44 |
# 9. ์ฑ ์คํ (PermissionError ์ถ๊ฐ ๋ฐฉ์ง)
|
| 45 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.fileWatcherType=none"]
|
|
|
|
|
|
| 10 |
git-lfs \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
RUN curl -L https://ollama.com/download/ollama-linux-amd64 -o /usr/local/bin/ollama \
|
| 14 |
+
&& chmod +x /usr/local/bin/ollama
|
| 15 |
+
|
| 16 |
+
# Ollama ๋ชจ๋ธ ๋ค์ด๋ก๋ (gemma2:9b ๋ชจ๋ธ ์ฌ์ฉ)
|
| 17 |
+
RUN /usr/local/bin/ollama pull gemma2:9b
|
| 18 |
+
|
| 19 |
# 3. ์์
๋๋ ํฐ๋ฆฌ ์ค์
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
+
# 6. ํ์ด์ฌ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น
|
| 23 |
+
COPY requirements.txt .
|
| 24 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
+
|
| 26 |
# 4. ์์ค ์ฝ๋ ๋ณต์ฌ
|
| 27 |
COPY . /app
|
| 28 |
|
| 29 |
# 5. Git LFS ์ค์ ๋ฐ ๋์ฉ๋ ํ์ผ ๋ค์ด๋ก๋
|
| 30 |
+
RUN git lfs install && git lfs pull
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
# 7. ์คํธ๋ฆผ๋ฆฟ์ด ์ฌ์ฉํ ์ค์ ํด๋๋ฅผ ๋ฏธ๋ฆฌ ๋ง๋ค๊ณ ๊ถํ ๋ถ์ฌ (PermissionError ํด๊ฒฐ)
|
| 33 |
# ๊ถํ/๊ฒฝ๋ก ๊ณ ์
|
|
|
|
| 48 |
EXPOSE 8501
|
| 49 |
|
| 50 |
# 9. ์ฑ ์คํ (PermissionError ์ถ๊ฐ ๋ฐฉ์ง)
|
| 51 |
+
#CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.fileWatcherType=none"]
|
| 52 |
+
CMD ["/bin/sh", "-c", "/usr/local/bin/ollama serve & streamlit run app.py"]
|