Spaces:
Runtime error
Runtime error
File size: 374 Bytes
afd68f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#!/bin/sh
set -e
# Start Ollama server in the background
ollama serve >/tmp/ollama.log 2>&1 &
OLLAMA_PID=$!
cleanup() {
kill "$OLLAMA_PID"
}
trap cleanup EXIT
# Wait until the server is ready
for i in $(seq 1 30); do
if curl -sf http://localhost:11434/api/tags >/dev/null 2>&1; then
break
fi
sleep 1
done
# Run the Discord bot
exec python -m bot.discord_bot
|