Spaces:
Runtime error
Runtime error
Download scripts/bootstrap.sh from Anish530/ATLAS-Backend: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/spaces/Anish530/ATLAS-Backend/resolve/main/scripts/bootstrap.sh
- Command line
-
hf download hf://spaces/Anish530/ATLAS-Backend/scripts/bootstrap.sh
-
curl -L -o bootstrap.sh https://huggingface.co/spaces/Anish530/ATLAS-Backend/resolve/main/scripts/bootstrap.sh
1.44 kB
| echo -e "\033[0;36mATLAS Project Bootstrap (Linux/Mac)\033[0m" | |
| echo -e "\033[0;36m---------------------------------\033[0m" | |
| # Move to root dir | |
| cd "$(dirname "$0")/.." | |
| # 1. Check Python | |
| if command -v python3 &>/dev/null; then | |
| echo -e "\033[0;32m[OK] Python3 is installed.\033[0m" | |
| else | |
| echo -e "\033[0;31m[ERROR] Python3 is not installed or not in PATH.\033[0m" | |
| exit 1 | |
| fi | |
| # 2. Check Node | |
| if command -v node &>/dev/null; then | |
| echo -e "\033[0;32m[OK] Node.js is installed.\033[0m" | |
| else | |
| echo -e "\033[0;31m[ERROR] Node.js is not installed or not in PATH.\033[0m" | |
| exit 1 | |
| fi | |
| # 3. Create .env | |
| if [ ! -f .env ]; then | |
| cp .env.example .env | |
| echo -e "\033[0;32m[OK] Copied .env.example to .env.\033[0m" | |
| else | |
| echo -e "\033[0;33m[INFO] .env already exists.\033[0m" | |
| fi | |
| # 4. Python venv | |
| echo -e "\033[0;36mCreating Python virtual environment...\033[0m" | |
| python3 -m venv .venv | |
| # 5. Activate venv and install dependencies | |
| echo -e "\033[0;36mInstalling backend dependencies...\033[0m" | |
| source .venv/bin/activate | |
| cd backend | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| cd .. | |
| # 6. Install frontend dependencies | |
| echo -e "\033[0;36mInstalling frontend dependencies...\033[0m" | |
| cd frontend | |
| npm install | |
| cd .. | |
| echo -e "\033[0;36m---------------------------------\033[0m" | |
| echo -e "\033[0;32mBootstrap Complete!\033[0m" | |
| echo -e "To activate the virtual environment manually, run: source .venv/bin/activate" | |