ruslanmv commited on
Commit
5d539a8
1 Parent(s): fd7db7b
Files changed (2) hide show
  1. Dockerfile +4 -1
  2. init.sh +7 -7
Dockerfile CHANGED
@@ -41,10 +41,13 @@ COPY . .
41
  # Set proper permissions for the translations directory
42
  RUN chmod -R 777 translations
43
 
 
 
 
44
  # Copy the init script
45
  COPY init.sh /app/init.sh
46
  RUN chmod +x /app/init.sh
47
- RUN mkdir /app/.ollama
48
 
49
  # Define the command to run the init script
50
  CMD ["/bin/bash", "/app/init.sh"]
 
41
  # Set proper permissions for the translations directory
42
  RUN chmod -R 777 translations
43
 
44
+ RUN /usr/local/bin/ollama serve
45
+ RUN /usr/local/bin/ollama pull llama3
46
+
47
  # Copy the init script
48
  COPY init.sh /app/init.sh
49
  RUN chmod +x /app/init.sh
50
+
51
 
52
  # Define the command to run the init script
53
  CMD ["/bin/bash", "/app/init.sh"]
init.sh CHANGED
@@ -1,18 +1,18 @@
1
  #!/bin/bash
2
  which ollama
3
  # Start Ollama in the background.
4
- /usr/local/bin/ollama serve &
5
  # Record Process ID.
6
- pid=$!
7
 
8
  # Pause for Ollama to start.
9
- sleep 5
10
 
11
- echo "🔴 Retrieve LLAMA3 model..."
12
- /usr/local/bin/ollama pull llama3
13
- echo "🟢 Done!"
14
  # Wait for Ollama process to finish.
15
- wait $pid
16
  # Start the Python application
17
  echo "Starting Python application..."
18
  python ./run.py
 
1
  #!/bin/bash
2
  which ollama
3
  # Start Ollama in the background.
4
+ #/usr/local/bin/ollama serve &
5
  # Record Process ID.
6
+ #pid=$!
7
 
8
  # Pause for Ollama to start.
9
+ #sleep 5
10
 
11
+ #echo "🔴 Retrieve LLAMA3 model..."
12
+ #/usr/local/bin/ollama pull llama3
13
+ #echo "🟢 Done!"
14
  # Wait for Ollama process to finish.
15
+ #wait $pid
16
  # Start the Python application
17
  echo "Starting Python application..."
18
  python ./run.py