hypha-compute
v0.1.0
Published
CLI for deploying and managing compute apps on Hypha Cloud — a Ray alternative with native multi-tenancy
Downloads
14
Maintainers
Readme
hypha-compute
CLI for deploying and managing compute apps on Hypha Cloud — a Ray alternative with native multi-tenancy.
Installation
npm install -g hypha-computeOr use directly with npx:
npx hypha-compute --helpQuick Start
# Set your credentials
export HYPHA_TOKEN="your-token"
export HYPHA_WORKSPACE="your-workspace"
# Deploy a Python app
hypha-compute deploy app.py
# Deploy with autoscaling
hypha-compute deploy model.py --min-replicas 1 --max-replicas 10
# List running apps
hypha-compute list
# View logs
hypha-compute logs my-app
# Stop an app
hypha-compute stop my-appCommands
| Command | Description |
|---------|-------------|
| deploy <file> | Deploy a .py file or .json manifest |
| list | List running compute apps |
| status <app-id> | Show detailed app info |
| logs <app-id> | View logs for a running app |
| stop <app-id> | Stop a running app |
| metrics <app-id> | Show deployment metrics |
| info | Show connection and worker info |
Deploy
Deploy a Python file directly:
hypha-compute deploy app.py --app-id my-appThe CLI auto-generates a compute-app manifest. If a requirements.txt exists in the same directory, dependencies are included automatically.
Deploy from a JSON manifest for full control:
{
"type": "compute-app",
"name": "my-model",
"entry_point": "main.py",
"requirements": ["torch", "transformers"],
"autoscaling": {
"enabled": true,
"min_replicas": 1,
"max_replicas": 5,
"target_ongoing_requests": 10
}
}hypha-compute deploy manifest.jsonOptions
Global Options
| Flag | Env Var | Description |
|------|---------|-------------|
| -s, --server-url | HYPHA_SERVER_URL | Hypha server URL (default: https://hypha.aicell.io) |
| -w, --workspace | HYPHA_WORKSPACE | Workspace name (default: public) |
| -t, --token | HYPHA_TOKEN | Auth token |
Deploy Options
| Flag | Description |
|------|-------------|
| --app-id <id> | Override app ID |
| --name <name> | Override app name |
| --min-replicas <n> | Minimum replicas (enables autoscaling) |
| --max-replicas <n> | Maximum replicas (enables autoscaling) |
| --no-start | Install only, don't start |
| --wait-for-service <id> | Wait for service registration (e.g., default) |
| --timeout <seconds> | Start timeout (default: 180) |
Python Library
The Python library provides the full compute primitives (autoscaler, P2C router, replica state machine, DAG executor, object store). Install with:
pip install hypha-computeSee the GitHub repository for Python API documentation.
License
MIT
