Quickstart: Deploying OpenRouter Runner
mainFollow these steps to set up your environment and deploy the runner using Modal and Poetry.
Note: This guide assumes you are using a dev environment. Switch to main when deploying to production.
- Navigate to the modal directory.
- Initialize dependencies and Modal authentication.
- Create and configure a Modal development environment.
- Configure Secret Groups for Hugging Face, the Runner API key, Sentry, and Datadog.
- Download models to prepare the storage.
- Deploy the runner.
# 1. Navigate to modal directory
cd path/to/modal
# 2. Setup Poetry and Modal
poetry install
poetry shell
modal token new
# 3. Create dev environment
modal environment create dev
# 4. Configure dev environment
modal config set-environment dev
# 5. Configure secret keys (Examples)
modal secret create huggingface HUGGINGFACE_TOKEN=<your huggingface token>
modal secret create ext-api-key RUNNER_API_KEY=<generate a random key>
modal secret create sentry SENTRY_DSN=<optional SENTRY_DSN>
modal secret create datadog DD_API_KEY=<optional DD_API_KEY> DD_SITE=<site name>
# 6. Download Models
modal run runner::download
# 7. Deploy Runner
modal deploy runner