gufett0 commited on
Commit
2dfa297
·
1 Parent(s): d89b025

fixed ollama startup

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -2
  2. startup.sh +5 -3
Dockerfile CHANGED
@@ -10,8 +10,6 @@ RUN apt-get update && \
10
  # Install Ollama
11
  RUN curl -fsSL https://ollama.com/install.sh | sh
12
 
13
- RUN ollama pull gemma2:2b
14
-
15
  RUN useradd -m -u 1000 user
16
  USER user
17
  ENV PATH="/home/user/.local/bin:$PATH"
 
10
  # Install Ollama
11
  RUN curl -fsSL https://ollama.com/install.sh | sh
12
 
 
 
13
  RUN useradd -m -u 1000 user
14
  USER user
15
  ENV PATH="/home/user/.local/bin:$PATH"
startup.sh CHANGED
@@ -1,12 +1,14 @@
1
  #!/bin/bash
2
 
3
- # Start Ollama service
4
- #ollama pull gemma2:2b
5
  ollama serve &
6
 
7
- # Ensure Ollama is ready
8
  sleep 10
9
 
 
 
 
10
  # Start the application
11
  #exec uvicorn app:app --host 0.0.0.0 --port 7860
12
 
 
1
  #!/bin/bash
2
 
3
+ # Start the Ollama service
 
4
  ollama serve &
5
 
6
+ echo "Waiting for Ollama server to start..."
7
  sleep 10
8
 
9
+ # Pull the Ollama model
10
+ ollama pull gemma2:2b
11
+
12
  # Start the application
13
  #exec uvicorn app:app --host 0.0.0.0 --port 7860
14