Skip to main content

Worker client for the ORunner Pool project

Project description

ORunner Pool - Worker Client

[!WARNING] This project is in a very early status. Consider it a working✨ proof of concept.

This is the worker component of the ORunner Pool project. It runs on contributor machines to serve Ollama models to the pool.

Prerequisites

Installation

Install the worker using pipx:

pipx install orunnerpool

To upgrade to the latest version:

pipx upgrade orunnerpool

Configuration

The worker uses a configuration file located at:

  • ~/.config/orunnerpool/config.ini (user-specific configuration)
  • /etc/orunnerpool/config.ini (system-wide configuration)

When you run the worker for the first time, an interactive setup will guide you through creating your configuration file. You'll need your API key from the ORunner Pool website.

Usage

  1. Make sure Ollama is running on your machine:

    ollama serve
    
  2. Start the worker:

    orunnerpool
    
  3. The worker will automatically:

    • Discover available models on your Ollama instance
    • Register with the pool
    • Send regular heartbeats
    • Poll for tasks and process them

Logs

The worker logs to stdout by default. You can redirect the output to a file:

orunnerpool > worker.log 2>&1

Running as a Service

[!WARNING] These steps are not tested yet.

Systemd (Linux)

Create a systemd service file:

sudo nano /etc/systemd/system/orunnerpool.service

Add the following content:

[Unit]
Description=ORunner Pool Worker
After=network.target

[Service]
User=yourusername
ExecStart=/usr/bin/orunnerpool
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl enable orunnerpool
sudo systemctl start orunnerpool

Launchd (macOS)

Create a plist file:

nano ~/Library/LaunchAgents/com.orunnerpool.worker.plist

Add the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.orunnerpool.worker</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/orunnerpool</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>~/Library/Logs/orunnerpool.log</string>
    <key>StandardErrorPath</key>
    <string>~/Library/Logs/orunnerpool.log</string>
</dict>
</plist>

Load the service:

launchctl load ~/Library/LaunchAgents/com.orunnerpool.worker.plist

Troubleshooting

Worker fails to register

  • Make sure Ollama is running and has at least one model loaded
  • Check that your API key is correct
  • Verify the pool API URL is accessible

Worker can't connect to Ollama

  • Ensure Ollama is running (ollama serve)
  • Check the Ollama URL in your config file
  • Verify there are no firewall rules blocking access to port 11434

Worker doesn't receive tasks

  • Check that your worker is registered successfully
  • Verify that your models are correctly listed in the pool
  • Make sure your worker's heartbeat is being received by the pool

Releasing

You can use the provided release script to automate the version update, build, and upload process:

rm dist/*
python -m build
twine upload dist/*

The script will:

  1. Update the version in both pyproject.toml and orunnerpool/init.py based on semantic versioning
  2. Build the package
  3. Prompt you to upload to PyPI

Alternatively, you can manually:

  • Build with python -m build
  • Publish to PyPI with twine upload dist/*

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

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

orunnerpool-0.1.2.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

orunnerpool-0.1.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file orunnerpool-0.1.2.tar.gz.

File metadata

  • Download URL: orunnerpool-0.1.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for orunnerpool-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b9a18434c1f58e5773f63f541da84860d2f857d11b819a9935b9174d6c83115c
MD5 b7a7dc01fa7d6ff072c87c05ac275249
BLAKE2b-256 31ea1ee37b7b19c7b0b846a83c412b9ff8dfe752512202261147ec3fd6711b57

See more details on using hashes here.

File details

Details for the file orunnerpool-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: orunnerpool-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for orunnerpool-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b385a56bb5eaad1ad3307fd72f872b3aa32d4cac62f5e298e30d4f112fad402
MD5 9d50bfe827583f8c36960bda37912e07
BLAKE2b-256 79be63b9ba044e598f2ad2562623f1b5173da4f4fbd8dc6cb5d377961ac7a9ae

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