Spaces:
Runtime error
Runtime error
| # Start nginx | |
| nginx | |
| # Start llamafiler instances | |
| /usr/local/bin/llamafiler --model /base/gemma-2b.gguf --listen 0.0.0.0:8082 & | |
| GEMMA_PID=$! | |
| /usr/local/bin/llamafiler --model /base/embeddings.gguf --listen 0.0.0.0:8081 & | |
| EMBEDDINGS_PID=$! | |
| # Wait for services | |
| until curl -s --fail -X POST http://localhost:8080/v1/chat/completions \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"model": "gemma-2b", "messages":[{"role":"user","content":"hi"}]}' >/dev/null 2>&1 && \ | |
| curl -s --fail -X POST http://localhost:8080/v1/embeddings \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"input":"test"}' >/dev/null 2>&1 | |
| do | |
| sleep 1 | |
| echo "Waiting for services..." | |
| done | |
| echo 'Services are ready!' | |
| # Start the main application | |
| exec ./bin/entrypoint.sh node app/main.bundle.js | |