Tanvrit Compute

Self-hosting Tanvrit Compute

> Running your own fleet of tanvrit-agent workers — the foundation of the > free tier. Self-hosted nodes are always free.

System requirements

  • Supported OSes: macOS 13+, Linux (x86_64 / arm64), Windows 11 (Docker Desktop required)
  • JVM: not required — the agent ships as a GraalVM native binary
  • Docker: optional, required only for DOCKER jobs
  • GPU: optional; NVIDIA (CUDA), AMD (ROCm), or Apple Silicon (Metal) are auto-detected

Install the agent

curl -fsSL https://compute.tanvrit.com/install.sh | sh

This downloads the appropriate tanvrit-agent binary for your platform and installs it to ~/.tanvrit/bin/.

Generate an API key in the portal

  1. Sign in at compute.tanvrit.com
  2. Open Settings → Agent API keys
  3. Click Generate key — the raw key is shown once. Copy it now.

Run the agent

export TANVRIT_SERVER_URL=https://api.tanvrit.com
export TANVRIT_API_KEY=<your-key>
export TANVRIT_NODE_NAME=${HOSTNAME}-prod    # optional
export TANVRIT_MAX_JOBS=4                    # concurrent jobs, default 2
export TANVRIT_LABELS=production,team-ml    # extra labels beyond auto-detected
tanvrit-agent

Running as a service

#### macOS (launchd)

<!-- ~/Library/LaunchAgents/com.tanvrit.agent.plist -->
<plist version="1.0">
<dict>
    <key>Label</key><string>com.tanvrit.agent</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/you/.tanvrit/bin/tanvrit-agent</string>
    </array>
    <key>EnvironmentVariables</key>
    <dict>
        <key>TANVRIT_API_KEY</key><string>YOUR_KEY</string>
    </dict>
    <key>RunAtLoad</key><true/>
    <key>KeepAlive</key><true/>
</dict>
</plist>

Then launchctl load ~/Library/LaunchAgents/com.tanvrit.agent.plist.

#### Linux (systemd)

# /etc/systemd/system/tanvrit-agent.service
[Unit]
Description=Tanvrit Compute Agent
After=network-online.target

[Service]
Environment="TANVRIT_API_KEY=YOUR_KEY"
ExecStart=/home/ubuntu/.tanvrit/bin/tanvrit-agent
Restart=always
RestartSec=5
User=ubuntu

[Install]
WantedBy=multi-user.target

Then sudo systemctl enable --now tanvrit-agent.

Ephemeral mode (Kubernetes / CI)

To run as a one-shot worker (pick one job, run it, exit):

tanvrit-agent --once
# or
TANVRIT_ONCE=true tanvrit-agent

This is useful for Kubernetes Jobs or GitHub Actions runners where each build should get a fresh container.

Label pool design

The scheduler matches jobs to nodes by label. Common conventions:

| Label | Meaning | |--- |--- | | gpu, cuda | auto-added when a CUDA GPU is detected | | metal | auto-added on Apple Silicon | | rocm | auto-added on AMD GPUs | | docker | auto-added when the Docker daemon is reachable | | android-sdk | auto-added when ANDROID_HOME is set | | xcode | auto-added on macOS with Xcode installed | | production | manual — mark a node as production-only | | fleet:eu-west | manual — region / fleet grouping |

A job with labels: ["gpu", "cuda"] will only be dispatched to nodes whose label set is a superset.

Security notes

  • The API key is stored on disk in plain text in the env file. Protect it
  • with filesystem permissions.

  • Outbound-only: the agent connects to the control plane — no inbound ports
  • are opened on the host.

  • Sensitive env vars (TANVRIT_API_KEY, AWS_SECRET_ACCESS_KEY,
  • GITHUB_TOKEN) are stripped from the job environment before execution.

  • Rotate keys from the portal any time; old keys are invalidated immediately.