Skip to main content

Golem Workers is an API providing direct and high-level access to CPU and GPU resources on the Golem Network.

Project description

golem-workers

Getting started

The are multiple ways to start interacting with golem-workers. Below are two of the most common ways to start it.

Docker example

Docker example will take care for installation, proper processes setup (golem-workers web server and golem-node service) and their basic configuration. Note that because of decentralized fashion, golem-node needs a few moments to gather information from the Golem Network, during that time, amount of returned proposals can be impacted.

To run docker example, checkout the repository and go to examples/docker directory, or directly copy its contents to your preferred destination.

  1. Make sure that Docker is running on your machine and your current user have access to it.

  2. Build and start docker compose project.

    docker compose up -d --build
    
  3. Prepare some funds for Golem's free test network. Note that this step is needed mostly once per yagna-data volume.

    docker compose exec golem-node yagna payment fund
    
  4. Golem-workers can be interacted with web api at http://localhost:8000. It's OpenApi Specification is available at http://localhost:8000/docs or http://localhost:8000/redoc

Web server

  1. Install golem-workers via:

    pip install golem-workers
    

    This step should install yagna binary for the next steps.

  2. Start golem-node instance. This will occupy your terminal session, so it's best to do it in separate session.

    yagna service run
    
  3. Prepare some funds for Golem's free test network. Note that this step is needed mostly once per golem-node installation.

    yagna payment fund
    
  4. Create new golem-node application token

    yagna app-key create <your-token-name>
    

    and put generated app-key into the .env file in the current directory

    YAGNA_APPKEY=<your-application-token>
    
  5. If you want to use Golem Reputation put new entry in .env file in the current directory

    GLOBAL_CONTEXTS=["golem_reputation.ReputationService"]
    
  6. Start golem-workers web server instance

    uvicorn golem_workers.entrypoints.web.main:app
    
  7. Golem-workers can be interacted with web api at http://localhost:8000. It's OpenApi Specification is available at http://localhost:8000/docs or http://localhost:8000/redoc

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

golem_workers-0.3.5.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

golem_workers-0.3.5-py3-none-any.whl (66.4 kB view details)

Uploaded Python 3

File details

Details for the file golem_workers-0.3.5.tar.gz.

File metadata

  • Download URL: golem_workers-0.3.5.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for golem_workers-0.3.5.tar.gz
Algorithm Hash digest
SHA256 f527c97536c820137e7d47220403a1ad267e6ceb7a64d332a7357e464258423f
MD5 adb9cb29170ead0442b4ad22594f8f4d
BLAKE2b-256 fdeff32c8e1466385e118372e09d69c059af48ee53834b9a2807f1cd3287ebf8

See more details on using hashes here.

File details

Details for the file golem_workers-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: golem_workers-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 66.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for golem_workers-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2f916fe3e6e3859756e7b6439db31bd756013bf98e249f8365011d9fed2b4751
MD5 622fae44c55d576035cf6059d97ba15f
BLAKE2b-256 5334cef2bbee6b10db240c2437f54d6c4b1f9f5ba4cfd02e7f3ce07ef0e5da94

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