Spaces:
Configuration error
Configuration error
Download deploy.sh from anu-122006/hackrx-project: direct link, hf CLI and curl.
- Browser
- Download file 1.33 kB
-
https://huggingface.co/spaces/anu-122006/hackrx-project/resolve/main/deploy.sh
- Command line
-
hf download hf://spaces/anu-122006/hackrx-project/deploy.sh
-
curl -L -o deploy.sh https://huggingface.co/spaces/anu-122006/hackrx-project/resolve/main/deploy.sh
1.33 kB
| # ============================================================================ | |
| #!/bin/bash | |
| # HackRx 6.0 Deployment Script | |
| echo "π Starting HackRx 6.0 Deployment..." | |
| # Check if .env file exists | |
| if [ ! -f .env ]; then | |
| echo "β .env file not found. Please create one with your API keys." | |
| echo "Required variables:" | |
| echo "- OPENAI_API_KEY" | |
| echo "- PINECONE_API_KEY (optional)" | |
| echo "- PINECONE_ENVIRONMENT (optional)" | |
| exit 1 | |
| fi | |
| # Install dependencies | |
| echo "π¦ Installing dependencies..." | |
| pip install -r requirements.txt | |
| # Run tests (if available) | |
| if [ -f "tests/test_main.py" ]; then | |
| echo "π§ͺ Running tests..." | |
| python -m pytest tests/ -v | |
| fi | |
| # Start the application | |
| echo "π Starting FastAPI application..." | |
| if [ "$1" == "production" ]; then | |
| echo "π Production mode" | |
| uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4 | |
| elif [ "$1" == "docker" ]; then | |
| echo "π³ Docker mode" | |
| docker-compose up --build -d | |
| echo "β Application started with Docker Compose" | |
| echo "π Check health: curl http://localhost:8000/health" | |
| echo "π Check metrics: curl http://localhost:8000/metrics" | |
| else | |
| echo "π§ Development mode" | |
| uvicorn main:app --host 0.0.0.0 --port 8000 --reload | |
| fi | |
| # ============================================================================ | |