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.5.0.tar.gz (56.4 kB view details)

Uploaded Source

Built Distribution

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

golem_workers-0.5.0-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: golem_workers-0.5.0.tar.gz
  • Upload date:
  • Size: 56.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/6.12.10-76061203-generic

File hashes

Hashes for golem_workers-0.5.0.tar.gz
Algorithm Hash digest
SHA256 64ac1ddd4835713a21eaa35fd7db5fcb2a779561002064c6d2634247c68e461f
MD5 02fc4b5f89bb81b8b3634ae59bd428cc
BLAKE2b-256 c5b762b580049e1239be1c00e881e53ec2fb35c9b5723d1f33ac04ebd4a3aa4f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: golem_workers-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 73.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/6.12.10-76061203-generic

File hashes

Hashes for golem_workers-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbb62c59e60932ad9dac521f28126fd6a2a140530456cbe74980bca141fbd053
MD5 1d21c55f6c83b7f6fdaf2bd0c839aed7
BLAKE2b-256 eb727b5975106b2eb25507ec71f45ed0463f6fab5efb8bc1e8bf1d2bcb3548a0

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