Skip to main content
Integrations

GPU compute wherever
you already work

Run GPU jobs from your CI pipeline, Python scripts, or Jupyter notebook — no infrastructure changes required. EU-hosted, GDPR-compliant, billed per second.

GitHub Actions

The Milaskinger/ghostnexus-run@v1 action submits your script to a GhostNexus GPU, streams logs back to your CI run, and fails the workflow if the job fails — with zero dependencies (pure Python stdlib).

1Add your API key as a repository secret

Go to Settings → Secrets → Actions and add:

GHOSTNEXUS_API_KEY = your key from the dashboard

2Reference a script file in your repo

yaml — .github/workflows/train.yml
# .github/workflows/train.yml
name: GPU Training

on: [push]

jobs:
  train:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Fine-tune on GPU
        id: gpu
        uses: Milaskinger/ghostnexus-run@v1
        with:
          api-key: ${{ secrets.GHOSTNEXUS_API_KEY }}
          task-name: train-${{ github.sha }}
          script-path: scripts/train.py
          timeout-minutes: 60

      - name: Report cost
        run: echo "Cost: ${{ steps.gpu.outputs.cost-credits }} USD in ${{ steps.gpu.outputs.duration-seconds }}s"

3Or write an inline script

yaml — inline script
- name: GPU health check
  uses: Milaskinger/ghostnexus-run@v1
  with:
    api-key: ${{ secrets.GHOSTNEXUS_API_KEY }}
    task-name: gpu-check
    script: |
      import torch
      print(f"GPU: {torch.cuda.get_device_name(0)}")
      print(f"VRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB")

Available inputs

InputRequiredDescription
api-keyYesYour GhostNexus API key (use secrets.GHOSTNEXUS_API_KEY)
task-nameNoJob name shown in dashboard (default: ci-job)
script-pathEither/orPath to a .py file in your repository
scriptEither/orInline Python script to run
timeout-minutesNoMax wait time in minutes (default: 30)

Available outputs

job-idGhostNexus job UUID
statussuccess | failed | timeout
cost-creditsCredits consumed (USD)
duration-secondsActual GPU runtime in seconds

Python SDK

The ghostnexus package provides a sync Client, an async AsyncClient, and a CLI — all built on the same REST API.

1Install and configure

bash
pip install ghostnexus          # sync Client
pip install "ghostnexus[async]"  # + AsyncClient (httpx)

# Configure once
ghostnexus configure             # prompts for API key → saves to ~/.ghostnexus/config

2Sync client — submit, wait, stream

python
import ghostnexus

client = ghostnexus.Client()  # reads GHOSTNEXUS_API_KEY from env

# Submit and wait
job = client.run("train.py", task_name="llama3-qlora")
print(f"Status: {job.status}")
print(f"Cost: ${job.cost_credits:.4f} | Duration: {job.duration_seconds:.0f}s")

# Stream logs in real time
job = client.run("train.py", task_name="llama3-qlora")
for chunk in job.stream_logs():
    print(chunk, end="", flush=True)

3AsyncClient — parallel job dispatch

python
import asyncio
import ghostnexus

async def main():
    async with ghostnexus.AsyncClient() as client:
        # Dispatch multiple jobs in parallel
        jobs = await asyncio.gather(
            client.run("eval_a100.py", task_name="eval-a100"),
            client.run("eval_4090.py", task_name="eval-4090"),
        )
        for job in jobs:
            print(f"{job.task_name}: {job.status} — ${job.cost_credits:.4f}")

asyncio.run(main())

4CLI — run from your terminal

bash
# Run a script and stream logs
ghostnexus run train.py --stream --task llama3-qlora

# Check job status
ghostnexus status <job-id>

# View job history
ghostnexus history --limit 20

# Check credit balance
ghostnexus balance

Sync Client

  • Blocking API — no event loop needed
  • Works in scripts, Celery tasks, Django views
  • `pip install ghostnexus`

AsyncClient

  • Non-blocking — runs in asyncio event loops
  • Parallel dispatch with `asyncio.gather()`
  • `pip install 'ghostnexus[async]'` (httpx)

Jupyter Magic Commands

Use the %%ghostnexus cell magic to run any notebook cell on a remote GPU. Output streams back inline — no SSH, no port forwarding.

1Install and configure

bash
pip install ghostnexus

# In your notebook
%load_ext ghostnexus_magic
%ghostnexus_config --api-key YOUR_API_KEY

2Run a cell on GPU

python — notebook cell
%%ghostnexus --task resnet-training
import torch
import torchvision

model = torchvision.models.resnet50(pretrained=False).cuda()
x = torch.randn(32, 3, 224, 224).cuda()
out = model(x)

print(f"GPU: {torch.cuda.get_device_name(0)}")
print(f"Output shape: {out.shape}")

Magic command options

--task NAMEJob name in the dashboard (default: notebook-job)
--timeout MINUTESMax wait time before timeout (default: 30)
--no-logsHide output, only show status badge

Note on environment

The cell runs in a fresh Python environment on the GPU node. Install packages with subprocess.run(['pip', 'install', 'torch']) at the top of your cell, or use the SDK's requirements parameter.

Ready to integrate?

Get your API key from the dashboard, add it to your secrets or config, and start dispatching GPU jobs in minutes. $15 free credits — no credit card required.