This repository shows how to implement Python worker handlers with the novita-gpus SDK.
Each example includes:
- A
handler.pyfile that defines the worker handler and starts it withnovita_gpus.start({"handler": handler}). - A Dockerfile for building the handler into a worker image.
- A
submit_task.pyscript that submits tasks to the endpoint with thenovita-gpusclient SDK.
| Example | Description |
|---|---|
| comfyui-worker | Runs ComfyUI from a SDK handler and returns generated images. |
| sleep-worker | Minimal SDK handler that sleeps for a requested duration and returns a JSON result. |
- A Docker registry you can push to.
- A Novita API key.
- A Novita endpoint ID and app name that use the worker image you built.
- Python 3.10+ for running
submit_task.py.
Task submission uses the endpoint name format <endpoint-id>-<app-name>.
For example, endpoint ID o8UJWkag5WTn and app name async produce
o8UJWkag5WTn-async.
This repository is licensed under the Apache License 2.0.