danghungithp commited on
Commit
3633e26
·
verified ·
1 Parent(s): a59c011

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -11,8 +11,9 @@ RUN pip3 install -r requirements.txt
11
  COPY . /app
12
  WORKDIR /app
13
 
14
- # Tạo shell script để khởi động dịch vụ
15
- RUN echo '#!/bin/bash\nollama serve &\nuntil curl -s http://localhost:11434 > /dev/null; do\n sleep 1\ndone\npython3 app.py' > start.sh && chmod +x start.sh
 
16
 
17
- # Ghi đè entrypoint để chạy script
18
- ENTRYPOINT ["/bin/bash", "-c", "./start.sh"]
 
11
  COPY . /app
12
  WORKDIR /app
13
 
14
+ # Create and configure the Ollama directory
15
+ RUN mkdir -p /app/ollama && chown -R ollama:ollama /app/ollama
16
+ ENV OLLAMA_HOME=/app/ollama
17
 
18
+ # Start the application
19
+ ENTRYPOINT ["ollama", "serve"]