Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
|
@@ -43,7 +43,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 43 |
COPY . /app
|
| 44 |
|
| 45 |
# 5. Git LFS ์ค์ ๋ฐ ๋์ฉ๋ ํ์ผ ๋ค์ด๋ก๋
|
| 46 |
-
RUN git lfs install && git lfs pull
|
| 47 |
|
| 48 |
# 7. ์คํธ๋ฆผ๋ฆฟ์ด ์ฌ์ฉํ ์ค์ ํด๋๋ฅผ ๋ฏธ๋ฆฌ ๋ง๋ค๊ณ ๊ถํ ๋ถ์ฌ (PermissionError ํด๊ฒฐ)
|
| 49 |
# ๊ถํ/๊ฒฝ๋ก ๊ณ ์
|
|
@@ -60,9 +60,14 @@ ENV HF_HOME=/tmp/hf-home \
|
|
| 60 |
|
| 61 |
RUN mkdir -p /tmp/hf-home /tmp/hf-cache /tmp/torch-cache /tmp/xdg-cache
|
| 62 |
|
| 63 |
-
#
|
|
|
|
| 64 |
EXPOSE 8501
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
#
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
| 43 |
COPY . /app
|
| 44 |
|
| 45 |
# 5. Git LFS ์ค์ ๋ฐ ๋์ฉ๋ ํ์ผ ๋ค์ด๋ก๋
|
| 46 |
+
RUN git lfs install && git lfs pull || true
|
| 47 |
|
| 48 |
# 7. ์คํธ๋ฆผ๋ฆฟ์ด ์ฌ์ฉํ ์ค์ ํด๋๋ฅผ ๋ฏธ๋ฆฌ ๋ง๋ค๊ณ ๊ถํ ๋ถ์ฌ (PermissionError ํด๊ฒฐ)
|
| 49 |
# ๊ถํ/๊ฒฝ๋ก ๊ณ ์
|
|
|
|
| 60 |
|
| 61 |
RUN mkdir -p /tmp/hf-home /tmp/hf-cache /tmp/torch-cache /tmp/xdg-cache
|
| 62 |
|
| 63 |
+
# ๋ด๋ถ ์ฐ๊ฒฐ์ฉ ํ๊ฒฝ๋ณ์(์ฑ์์ ์ฝ๊ฒ ํ๋ ค๋ฉด ํธ์์ ์ง์ )
|
| 64 |
+
ENV OLLAMA_HOST=http://127.0.0.1:11434
|
| 65 |
EXPOSE 8501
|
| 66 |
+
# (์ธ๋ถ๋ก Ollama๋ฅผ ์ด ํ์๋ ์์ง๋ง, ์์ด๋ ๋ฌด๋ฐฉ)
|
| 67 |
+
EXPOSE 11434
|
| 68 |
|
| 69 |
+
# ๐ด ์ต์ข
์คํ ์ปค๋งจ๋: ollama serve โ ๋ ๋์ฒดํฌ โ streamlit
|
| 70 |
+
CMD bash -lc '\
|
| 71 |
+
ollama serve & \
|
| 72 |
+
for i in {1..60}; do curl -fsS http://127.0.0.1:11434/api/version >/dev/null && break || sleep 1; done; \
|
| 73 |
+
streamlit run app.py --server.address=0.0.0.0 --server.port=${PORT:-8501}'
|