Skip to content

novitalabs/gpus-python-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Novita GPUs Python Examples

This repository shows how to implement Python worker handlers with the novita-gpus SDK.

Each example includes:

  • A handler.py file that defines the worker handler and starts it with novita_gpus.start({"handler": handler}).
  • A Dockerfile for building the handler into a worker image.
  • A submit_task.py script that submits tasks to the endpoint with the novita-gpus client SDK.

Examples

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.

Common Requirements

  • 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.

License

This repository is licensed under the Apache License 2.0.

About

novita gpus sdk example

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages