Qwen3_1.7B_API_New / entrypoint.sh
Bleak's picture
Update entrypoint.sh
a5eb985 verified
#!/bin/bash
# Starting server
echo "Starting server"
export OLLAMA_KEEP_ALIVE=1200s
OLLAMA_DEBUG=1 OLLAMA_KEEP_ALIVE=1200s OLLAMA_LOAD_TIMEOUT=1200s ollama serve &
sleep 1
# Splitting the models by comma and pulling each
IFS=',' read -ra MODELS <<< "$model"
for m in "${MODELS[@]}"; do
echo "Pulling $m"
ollama pull "$m"
sleep 5
# echo "Running $m"
# ollama run "$m"
# No need to sleep here unless you want to give some delay between each pull for some reason
done
# Keep the script running to prevent the container from exiting
wait