Spaces:
Build error
Build error
| # AudioForge Setup Status | |
| ## Completed Tasks | |
| ### 1. Fixed Windows Console Encoding Issues | |
| - Updated all Python scripts to handle Windows console encoding properly | |
| - Fixed `quick_setup.py`, `verify_setup.py`, and `init_db.py` to work on Windows | |
| ### 2. Fixed Python Package Configuration | |
| - Updated `pyproject.toml` to support Python 3.13 | |
| - Removed incompatible dependencies (torch 2.1.0, audiocraft 1.3.0) | |
| - Created optional `[ml]` dependency group for ML models | |
| - Added hatchling build configuration to specify package location | |
| ### 3. Backend Dependencies Installed | |
| - Created virtual environment at `backend/.venv` | |
| - Installed all core dependencies successfully | |
| - Created `.env` file from `.env.example` | |
| - Created storage directories | |
| ### 4. Project Structure Verified | |
| - Backend: FastAPI application with proper structure | |
| - Frontend: Next.js 14 application with TypeScript | |
| - Docker Compose configuration ready | |
| - All documentation files in place | |
| ## Current Status | |
| **Backend**: Dependencies installed, ready to run (requires PostgreSQL and Redis) | |
| **Frontend**: Not yet installed | |
| **Database**: Not yet initialized | |
| **Docker**: Installed but Docker Desktop not running | |
| ## Next Steps | |
| ### Option 1: Docker Compose (Recommended) | |
| 1. **Start Docker Desktop** | |
| ```powershell | |
| # Start Docker Desktop application manually | |
| ``` | |
| 2. **Start all services with Docker Compose** | |
| ```powershell | |
| docker-compose up -d | |
| ``` | |
| 3. **Verify services are running** | |
| ```powershell | |
| docker-compose ps | |
| docker-compose logs -f | |
| ``` | |
| 4. **Access the application** | |
| - Frontend: http://localhost:3000 | |
| - Backend API: http://localhost:8000 | |
| - API Docs: http://localhost:8000/api/docs | |
| ### Option 2: Manual Setup (Local Development) | |
| #### Step 1: Start PostgreSQL and Redis | |
| **Option A: Using Docker** | |
| ```powershell | |
| # Start only PostgreSQL and Redis | |
| docker run -d --name audioforge-postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=audioforge -p 5432:5432 postgres:16-alpine | |
| docker run -d --name audioforge-redis -p 6379:6379 redis:7-alpine | |
| ``` | |
| **Option B: Using Local Installation** | |
| - Install PostgreSQL 16 and Redis locally | |
| - Ensure they're running on default ports (5432 and 6379) | |
| #### Step 2: Initialize Database | |
| ```powershell | |
| cd backend | |
| .venv\Scripts\python.exe scripts\init_db.py | |
| ``` | |
| #### Step 3: Start Backend | |
| ```powershell | |
| cd backend | |
| .venv\Scripts\uvicorn.exe app.main:app --reload | |
| ``` | |
| #### Step 4: Install Frontend Dependencies | |
| ```powershell | |
| cd frontend | |
| pnpm install | |
| ``` | |
| #### Step 5: Create Frontend Environment File | |
| ```powershell | |
| cd frontend | |
| echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.local | |
| ``` | |
| #### Step 6: Start Frontend | |
| ```powershell | |
| cd frontend | |
| pnpm dev | |
| ``` | |
| ## Verification | |
| ### Backend Health Check | |
| ```powershell | |
| curl http://localhost:8000/health | |
| ``` | |
| ### Backend API Documentation | |
| Open http://localhost:8000/api/docs in your browser | |
| ### Frontend | |
| Open http://localhost:3000 in your browser | |
| ## Installing ML Models (Optional) | |
| The ML models (torch, audiocraft) are optional and can be installed later: | |
| ```powershell | |
| cd backend | |
| .venv\Scripts\uv.exe pip install -e ".[ml]" | |
| ``` | |
| **Note**: This will download ~2GB of model files on first run. | |
| ## Troubleshooting | |
| ### Backend won't start | |
| - Ensure PostgreSQL is running on port 5432 | |
| - Ensure Redis is running on port 6379 | |
| - Check `.env` file has correct DATABASE_URL and REDIS_URL | |
| ### Frontend won't start | |
| - Ensure `pnpm` is installed: `npm install -g pnpm` | |
| - Delete `node_modules` and `pnpm-lock.yaml`, then run `pnpm install` again | |
| ### Database connection error | |
| - Verify PostgreSQL is running: `docker ps` or check local service | |
| - Test connection: `psql -h localhost -U postgres -d audioforge` | |
| ### Docker issues | |
| - Ensure Docker Desktop is running | |
| - Check Docker daemon status: `docker ps` | |
| - Restart Docker Desktop if needed | |
| ## Files Modified | |
| 1. `backend/pyproject.toml` - Updated dependencies and build configuration | |
| 2. `backend/scripts/quick_setup.py` - Fixed Windows encoding | |
| 3. `backend/scripts/verify_setup.py` - Fixed Windows encoding | |
| 4. `backend/scripts/init_db.py` - Fixed Windows encoding | |
| ## Environment Configuration | |
| ### Backend `.env` (already created) | |
| ```env | |
| # Application | |
| DEBUG=false | |
| ENVIRONMENT=development | |
| # Database | |
| DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/audioforge | |
| # Redis | |
| REDIS_URL=redis://localhost:6379/0 | |
| # Music Generation | |
| MUSICGEN_MODEL=facebook/musicgen-medium | |
| MUSICGEN_DEVICE=cpu | |
| MUSICGEN_DURATION=30 | |
| # Vocal Generation | |
| BARK_MODEL=suno/bark | |
| BARK_DEVICE=cpu | |
| # Storage | |
| AUDIO_STORAGE_PATH=./storage/audio | |
| ``` | |
| ### Frontend `.env.local` (needs to be created) | |
| ```env | |
| NEXT_PUBLIC_API_URL=http://localhost:8000 | |
| ``` | |
| ## Recommended Next Action | |
| **For quickest setup**: Start Docker Desktop, then run `docker-compose up -d` | |
| This will start all services (PostgreSQL, Redis, Backend, Frontend) in containers and handle all initialization automatically. | |