OLMoASR / DEPLOYMENT.md
Huong
new DEPLOYMENT.md
45d1690
# Deployment Instructions
## Environment Variables
This application requires the following environment variables:
### GITHUB_TOKEN
- **Purpose**: Access to private GitHub repository `huongngo-8/olmoasr`
- **Required permissions**: `repo` (for private repository access)
- **How to get**: Go to [GitHub Settings > Personal Access Tokens](https://github.com/settings/tokens)
## Local Development
1. Create a `.env` file in the project root:
```bash
GITHUB_TOKEN=your_github_token_here
```
2. Load environment variables:
```bash
export $(cat .env | xargs)
```
3. Run the application:
```bash
python app.py
```
## HuggingFace Spaces Deployment
1. **Create your Space** on HuggingFace
2. **Add Repository Secret**:
- Go to your Space's settings
- Navigate to "Repository secrets" or "Variables and secrets"
- Add `GITHUB_TOKEN` with your GitHub Personal Access Token value
3. **Deploy your code** - the `install_dependencies.py` script will automatically handle private repository installation
## How It Works
- `requirements.txt` contains only public dependencies
- `install_dependencies.py` handles private repository installation using environment variables
- `app.py` calls the installation script at startup
- No sensitive tokens are stored in version control
## Troubleshooting
If you see "Warning: GITHUB_TOKEN environment variable not found":
1. Verify the environment variable is set correctly
2. Check that your token has `repo` permissions
3. Ensure the token hasn't expired
4. Verify you have access to the `huongngo-8/olmoasr` repository