Skip to main content

Poly Hammer self-hosted GPU worker agent

Project description

Poly Hammer Self-Hosted GPU Worker

A CLI agent that connects your GPU workstation to the Poly Hammer Portal, letting you run AI inference jobs on your own hardware instead of consuming cloud credits.

Requirements

  • NVIDIA GPU with CUDA drivers installed
  • Docker with NVIDIA Container Toolkit (--gpus support)
  • Python 3.13+
  • An active Poly Hammer Portal account with a registered worker key

Quick Start

1. Check GPU compatibility

uvx poly-hammer-worker check-gpu

This will display your GPU model, VRAM, CUDA version, CPU cores, and RAM.

2. Register a worker in the Portal

Navigate to the Workers page in the Poly Hammer Portal and click Add Worker. You'll receive a worker key (ph_worker_...) — save it, it's shown only once.

3. Start the worker

uvx poly-hammer-worker start --worker-key ph_worker_XXXXXXXX

Or use environment variables:

export PH_WORKER_KEY=ph_worker_XXXXXXXX
export PH_PORTAL_URL=https://api.portal.polyhammer.com   # default
ph-worker start

The worker will:

  1. Detect your GPU/CUDA capabilities
  2. Send heartbeats to the portal
  3. Long-poll for inference jobs
  4. Pull the correct Docker image (tagged by CUDA version) on first job
  5. Run inference in an isolated container with GPU access
  6. Upload results and report completion

How It Works

Portal API  ←→  ph-worker agent  ←→  Docker (GPU container)
                    │                        │
                    ├── heartbeat (60s)       ├── JSON stdin (job)
                    ├── poll for jobs         ├── JSON stdout (progress)
                    ├── report progress       └── S3 upload (result)
                    └── report complete/fail
  • Images are pre-built with model weights baked in — no download delays at inference time
  • CUDA-versioned tags (cuda13.1, etc.) ensure compatibility with your local drivers
  • Dynamic pulling — the worker automatically pulls the right image when it receives a job for a model it hasn't run before

Configuration

Option Env Var Default Description
--worker-key PH_WORKER_KEY (required) Worker API key from the portal
--portal-url PH_PORTAL_URL https://api.portal.polyhammer.com Portal API base URL

Troubleshooting

"No CUDA detected"

  • Ensure NVIDIA drivers are installed: nvidia-smi
  • The NVIDIA Container Toolkit must be installed for Docker GPU support

Container fails to start

  • Verify Docker GPU support: docker run --rm --gpus all nvidia/cuda:13.1.0-base-ubuntu22.04 nvidia-smi
  • Check Docker daemon is running: docker info

Worker shows OFFLINE in portal

  • Heartbeats are sent every 60 seconds; the portal marks workers offline after 120 seconds
  • Check network connectivity to the portal URL
  • Verify your worker key is correct

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poly_hammer_worker-0.1.1.dev6.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poly_hammer_worker-0.1.1.dev6-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file poly_hammer_worker-0.1.1.dev6.tar.gz.

File metadata

  • Download URL: poly_hammer_worker-0.1.1.dev6.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for poly_hammer_worker-0.1.1.dev6.tar.gz
Algorithm Hash digest
SHA256 7d541c6489e3e1a75d1ecb4e6680774e90f6757e20fb5d509f3d01cae4a56fae
MD5 6975ec5bef62b5f0c6e8c366f5ba0225
BLAKE2b-256 2d425109da970947a8f4f3068ae6353314b169072ebaa8f94cfc965915d57843

See more details on using hashes here.

File details

Details for the file poly_hammer_worker-0.1.1.dev6-py3-none-any.whl.

File metadata

  • Download URL: poly_hammer_worker-0.1.1.dev6-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for poly_hammer_worker-0.1.1.dev6-py3-none-any.whl
Algorithm Hash digest
SHA256 e531f9cf73aaf1e25d7729f070ca62c9544f5b1834f1b7cb15763023dfe5092a
MD5 2f23f0f78c77b0503df3bd04350ed909
BLAKE2b-256 e7496b3a71b279e655e3ffe0cb715b052fc60781c248855b9c8bbc99b2267378

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page