test72 / start.sh
zyxciss's picture
Create start.sh
eb8ec8a verified
raw
history blame contribute delete
399 Bytes
#!/bin/bash
export OLLAMA_HOME=/tmp/ollama
export OLLAMA_MODELS=/tmp/ollama/models
# Ensure the directory exists and is writable
mkdir -p $OLLAMA_MODELS && chmod -R 777 /tmp/ollama
# Start Ollama in the background
ollama serve &
# Wait for Ollama to initialize
sleep 5
# Attempt to pull models
ollama pull deepseek/deepseek-r1:7b
ollama pull llava
# Keep the container running
tail -f /dev/null