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.
-
Make sure that Docker is running on your machine and your current user have access to it.
-
Build and start docker compose project.
docker compose up -d --build
-
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
-
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
-
Install golem-workers via:
pip install golem-workers
This step should install
yagna
binary for the next steps. -
Start
golem-node
instance. This will occupy your terminal session, so it's best to do it in separate session.yagna service run
-
Prepare some funds for Golem's free test network. Note that this step is needed mostly once per
golem-node
installation.yagna payment fund
-
Create new
golem-node
application tokenyagna app-key create <your-token-name>
and put generated app-key into the
.env
file in the current directoryYAGNA_APPKEY=<your-application-token>
-
If you want to use Golem Reputation put new entry in
.env
file in the current directoryGLOBAL_CONTEXTS=["golem_reputation.ReputationService"]
-
Start golem-workers web server instance
uvicorn golem_workers.entrypoints.web.main:app
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file golem_workers-0.3.3.tar.gz
.
File metadata
- Download URL: golem_workers-0.3.3.tar.gz
- Upload date:
- Size: 51.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e33b37090e707ba61c711e39a6ec461179710a8a40ce92123ca4901bf1e8be6 |
|
MD5 | 540e92ef5fa0127c462367e06da5d0ab |
|
BLAKE2b-256 | 7b48e2fbad70f4538febc5e15b72e76f9799881dca4115c5f994870dfc8fb3ca |
File details
Details for the file golem_workers-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: golem_workers-0.3.3-py3-none-any.whl
- Upload date:
- Size: 66.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9bedb166c3d04fdba39aa822825d6500cadcdc7224736506ebcc36c8efeacd4 |
|
MD5 | 257d8d366e8ce48ebd9dfe5b83c0c773 |
|
BLAKE2b-256 | 794d9fab6c6dc7e7579b3455c3e6de291425a397a77b6185a4f135cae233f655 |