Deploy_FastAPI_Space / pull_models.sh
thangquang09
update Dockerfile
78f1859
raw
history blame contribute delete
335 Bytes
#!/bin/bash
echo "Checking for models..."
# Ensure we're using the right home directory
export HOME=/root
# Check if Ollama is running
if ! pgrep -x "ollama" > /dev/null
then
echo "Ollama is not running. Starting Ollama..."
ollama serve &
sleep 5
fi
# Try to pull the model
echo "Pulling phi2 model..."
ollama pull phi2