code-slicer commited on
Commit
9116ec3
ยท
verified ยท
1 Parent(s): f4851ab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -0
Dockerfile CHANGED
@@ -41,5 +41,19 @@ RUN mkdir -p /tmp/hf-home /tmp/hf-cache /tmp/torch-cache /tmp/xdg-cache
41
  # 8. ํฌํŠธ ๊ฐœ๋ฐฉ
42
  EXPOSE 8501
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  # 9. ์•ฑ ์‹คํ–‰ (PermissionError ์ถ”๊ฐ€ ๋ฐฉ์ง€)
45
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.fileWatcherType=none"]
 
41
  # 8. ํฌํŠธ ๊ฐœ๋ฐฉ
42
  EXPOSE 8501
43
 
44
+ # ์˜ฌ๋ผ๋งˆ ์„œ๋ฒ„
45
+ FROM ubuntu:22.04
46
+ RUN apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/*
47
+ RUN curl -fsSL https://ollama.com/install.sh | bash
48
+
49
+ ENV OLLAMA_MODELS=/data/ollama
50
+ ENV OLLAMA_ORIGINS=* # ์šด์˜์—์„  ์ •ํ™•ํ•œ ๋„๋ฉ”์ธ์œผ๋กœ ์ œํ•œ ๊ถŒ์žฅ
51
+
52
+ CMD bash -lc '\
53
+ OLLAMA_HOST=0.0.0.0:$PORT ollama serve & \
54
+ until curl -s http://127.0.0.1:$PORT/api/version >/dev/null; do sleep 1; done; \
55
+ # (์„ ํƒ) ๋ฏธ๋ฆฌ ํ•œ ๋ชจ๋ธ pull: ollama pull llama3.1:8b || true; \
56
+ wait'
57
+
58
  # 9. ์•ฑ ์‹คํ–‰ (PermissionError ์ถ”๊ฐ€ ๋ฐฉ์ง€)
59
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.fileWatcherType=none"]