ARCH.AI_SPACE / start.sh
Gemini
feat: Add FastAPI gateway for API key authentication
7c4cf70
#!/bin/sh
# 1. Start the Ollama server in the background
ollama serve &
# 2. Wait for the Ollama server to be up and running
echo "Waiting for Ollama server to start..."
while ! curl -s http://localhost:11434/ > /dev/null; do
sleep 1
done
echo "Ollama server is running."
# 3. Start the FastAPI gateway server in the foreground
# It will listen on port 7860, which is the default for Hugging Face Spaces
echo "Starting FastAPI gateway..."
uvicorn main:app --host 0.0.0.0 --port 7860