Create start.sh
Browse files
start.sh
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
export OLLAMA_HOME=/tmp/ollama
|
3 |
+
export OLLAMA_MODELS=/tmp/ollama/models
|
4 |
+
|
5 |
+
# Ensure the directory exists and is writable
|
6 |
+
mkdir -p $OLLAMA_MODELS && chmod -R 777 /tmp/ollama
|
7 |
+
|
8 |
+
# Start Ollama in the background
|
9 |
+
ollama serve &
|
10 |
+
|
11 |
+
# Wait for Ollama to initialize
|
12 |
+
sleep 5
|
13 |
+
|
14 |
+
# Attempt to pull models
|
15 |
+
ollama pull deepseek/deepseek-r1:7b
|
16 |
+
ollama pull llava
|
17 |
+
|
18 |
+
# Keep the container running
|
19 |
+
tail -f /dev/null
|