Golem Workers is an API providing direct and high-level access to GPU and CPU resources on the Golem Network.
Project description
cluster-api
Getting started
Currently cluster-api is only available for used via direct installation from git repository. Here are some steps to prepare local development environment.
Prerequisites
cluster-api uses poetry for project management and poethepoet for task running. To install those tools you can use pipx:
pipx install poetry poethepoet
or just pip:
pip install poetry poethepoet
Also, cluster-api needs some instance of golem-node to interact with Golem Network.
Download newest stable version golem-requestor-<your OS type>
and make sure that its binaries are available from your PATH
environment variable.
Optionally, if you want to use simpler startup, install Docker.
Installation
- Clone the repo
git clone https://github.com/golemfactory/cluster-api
- Go inside of the newly created directory
cd cluster-api
- Install project dependencies
poetry install
Running
The are multiple ways to run cluster-api instance. Below are two of the simplest ways to start it.
Docker example
-
Start Docker instance and make sure that is running and the current user have access to it.
-
Go to docker example directory.
cd examples/docker
-
Build and start compose project in the background. Note that at current stage, your Python and Poetry version needs to match versions used in
Dockerfile
. Note that because of decentralized fashion,golem-node
needs a moment to gather information from the Golem Network and amount of returned proposals can be impacted.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
Development
-
Start
golem-node
instance in dedicated terminal session. Note that because of decentralized fashion,golem-node
needs a moment to gather information from the Golem Network and amount of returned proposals can be impacted.yagna service start
-
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 create
.env
file at the root of the repo and put thereYAGNA_APPKEY=<your-application-token>
-
Start cluster-api instance
poetry run fastapi dev golem_cluster_api/main.py --no-reload
Usage
Cluster-api can be interacted with web api at http://localhost:8000. It's OpenApi Specification is available at http://localhost:8000/docs
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.0.1.tar.gz
.
File metadata
- Download URL: golem_workers-0.0.1.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa455aa577899355ced34287607c4b842e37c3f535bde42ee6ef4a0a2280034 |
|
MD5 | 751801ad5a8b468b906057b94b9b1bb2 |
|
BLAKE2b-256 | ea86d13c053f5de5c413c3a49748db6cb1af88590c120c244a7098c30ba604ae |
File details
Details for the file golem_workers-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: golem_workers-0.0.1-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df07197f90668b3e9559eade18b2ca653bccfb2a7295fd37328a638971ea711 |
|
MD5 | 010ad13250d72fc5b8691fece7a7bf84 |
|
BLAKE2b-256 | 7e921512cba1cd61029abe71eade87066f6d4a776d203bac13ba9c34855756d5 |