18 lines
321 B
Bash
18 lines
321 B
Bash
|
|
#!/bin/sh
|
||
|
|
|
||
|
|
# Start the server in the background
|
||
|
|
ollama serve &
|
||
|
|
|
||
|
|
# Wait until the server is reachable
|
||
|
|
until curl -s http://localhost:11434 | grep -q 'Ollama is running'; do
|
||
|
|
echo 'Waiting for Ollama to start...'
|
||
|
|
sleep 2
|
||
|
|
done
|
||
|
|
|
||
|
|
# Pull the model
|
||
|
|
ollama pull llama3.1
|
||
|
|
ollama pull moondream
|
||
|
|
|
||
|
|
# Wait for background jobs
|
||
|
|
wait
|