The are multiple ways to start interacting with golem-workers. Below are two of the most common ways to start it.
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
-
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