|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
export OMP_NUM_THREADS=2 |
|
export MKL_NUM_THREADS=2 |
|
export CUDA_VISIBLE_DEVICES=-1 |
|
|
|
|
|
ollama serve & |
|
|
|
|
|
echo "Mistral 7b will be download" |
|
if ! ollama list | grep -q "YandexGPT"; then |
|
ollama pull yandex/YandexGPT-5-Lite-8B-instruct-GGUF |
|
fi |
|
|
|
|
|
max_attempts=30 |
|
attempt=0 |
|
while ! curl -s http://localhost:11434/api/tags >/dev/null; do |
|
sleep 1 |
|
attempt=$((attempt + 1)) |
|
if [ $attempt -eq $max_attempts ]; then |
|
echo "Ollama failed to start within 30 seconds. Exiting." |
|
exit 1 |
|
fi |
|
done |
|
|
|
echo "Ollama is Ready - YandexGPT is Loaded" |
|
ls |
|
ollama list |
|
|
|
python3 app.py |