Skip to main content

Simple task manager and job queue for distributed rendering. Built on celery and redis.

Project description

Distributask

A simple way to distribute rendering tasks across multiple machines.

Lint and Test PyPI version License forks - distributask

Description

Distributask distributes rendering using the Celery task queue. The queued tasks are then passed to workers using Redis as a message broker. Once the worker has completed the task, the result is uploaded to Huggingface.

Installation

pip install distributask

Development

Setup

Clone the repository and navigate to the project directory:

git clone https://github.com/RaccoonResearch/distributask.git
cd distributask

Install the required packages:

pip install -r requirements.txt

Install the distributask package:

python setup.py install

Configuration

Create a .env file in the root directory of your project or set environment variables to create your desired setup:

REDIS_HOST=redis_host
REDIS_PORT=redis_port
REDIS_USER=redis_user
REDIS_PASSWORD=redis_password
VAST_API_KEY=your_vastai_api_key
HF_TOKEN=your_huggingface_token
HF_REPO_ID=your_huggingface_repo
BROKER_POOL_LIMIT=broker_pool_limit

Getting Started

Running an Example Task

To run an example task and see Distributask in action, you can execute the example script provided in the project:

# To run the example task locally using either a Docker container or a Celery worker
python -m distributask.example.local

# To run the example task on vast.ai ("kitchen sink" example)
python -m distributask.example.distributed

This script configures the environment, registers a sample function, dispatches a task, and monitors its execution.

Command Options

  • --max_price is the max price (in $/hour) a node can be be rented for.
  • --max_nodes is the max number of vast.ai nodes that can be rented.
  • --docker_image is the name of the docker image to load to the vast.ai node.
  • --module_name is the name of the celery worker
  • --number_of_tasks is the number of example tasks that will be added to the queue and done by the workers.

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

@misc{distributask,
  author = {Raccoon Research},
  title = {distributask: a simple way to distribute rendering tasks across mulitiple machines},
  year = {2024},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/RaccoonResearch/distributask}}
}

Contributors

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

distributask-0.0.38.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

distributask-0.0.38-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file distributask-0.0.38.tar.gz.

File metadata

  • Download URL: distributask-0.0.38.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for distributask-0.0.38.tar.gz
Algorithm Hash digest
SHA256 739b00ec851ae974a4a708b751f1c29d76eac9f244d7a874a5802e6e7b2d26cc
MD5 6a9166c60bbbe5a545da1c9ef2915eb1
BLAKE2b-256 3f1e0c70f97622ba00c0417665a2876c6d62e780141c7baca11de372b358fc8d

See more details on using hashes here.

File details

Details for the file distributask-0.0.38-py3-none-any.whl.

File metadata

File hashes

Hashes for distributask-0.0.38-py3-none-any.whl
Algorithm Hash digest
SHA256 22fa6a73528231f966a6a4bef6d07e362c8287b9ebd3e89aedbf35333c7d4114
MD5 31102328cb1b57d9ef227e67fb0818a6
BLAKE2b-256 561b4755234390fafa4dbf1e755cc0a9d9fd039c5b0f15a9f8867707a66547fc

See more details on using hashes here.

Supported by

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