Skip to main content

Demo Package for GTasker.

Project description

GTasker

GTasker

GTasker is a simple command-line scheduling tool for sequential and parallel execution of CPU or single-GPU tasks.

Installation

Install from PyPI.

pip install gtasker

Or install from GitHub.

pip install git+https://github.com/suffoquer-fang/Gtasker.git@main

Usage

usage: gta [-h] [-v] [commands]

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

commands:
    start-server        Start the daemon server
    add                 Enqueue a task for execution
    remove              Remove a task from the queue
    kill                Kill a running task
    restart             Restart a task
    clean               Remove all success tasks from the queue
    follow              Follow the output of a running task
    log                 Display the output log of a task
    shutdown            Remotely shutdown the daemon
    status              Display the status of the daemon

Quick Start

Start the daemon server

You have to start the daemon before using gta client.

Run in the current shell.

gta start-server

Add the -d or --daemon flag to run in the background.

gta start-server -d

Adding new tasks

To add a task:

gta add ls

Or a more complex command:

gta add "sleep 10 && echo 'hello world' && exit 0"

You can add --path {path} argument to specify the working directory for the task, which is set to current directoy by default.

If the task should be executed after some certain task(s), you can add --after {after} argument to set the pre-requist tasks. The task will be executed only after all pre-tasks have been successfully completed.

For GPU tasks, you can set the required GPU memory by --mem {memory}. The task will be executed on a GPU with more free memory than required.

You may further set the required GPU device(s) by --gpu {gpu_devices}. The task will only be executed on the preset GPU device(s).

Controlling tasks

You can kill a running task by gta kill {task_id}.

To restart a killed (success / failed) task, you can simply use gta restart {task_id} and the task will be restarted as a new one. You can add --inplace flag to restart it in place.

Displaying tasks

You can use gta status to get the current status of task queue.

To look at the output log of a task, you can use gta log {task_id} or gta follow {task_id} to follow the output of a running task.

References

This repo is inspired by pueue, sincerely grateful for it.

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

gtasker-1.0.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

gtasker-1.0.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file gtasker-1.0.1.tar.gz.

File metadata

  • Download URL: gtasker-1.0.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for gtasker-1.0.1.tar.gz
Algorithm Hash digest
SHA256 38dd900902202cc2670a1b40aa9426e9ca7347c5a9ee3148b023dd91fdb4e36e
MD5 b9038b2fe987f86d61990678e563c0cb
BLAKE2b-256 79397fd3ef2a77b7f49aaa6a749b4afd6d912ae716eb904a6583d52fe30967b3

See more details on using hashes here.

File details

Details for the file gtasker-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gtasker-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for gtasker-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27f23c0ab9b8803ab2c7187786f56e7e9cc41fb8070247d02c72b8d2d851af8b
MD5 125846ca7b8e85380907db927b0d9042
BLAKE2b-256 6fe22896288e0a876e2e7b1383168ac6796324cdc6af74044ef2391a20675f38

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