Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
kush-alloralabs committed Jul 22, 2024
1 parent fd0b73d commit e6f5c80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ allocmd generate worker --name <workerName> --topic <topicId> --env dev --networ
cd <workerName>/worker
```
<Callout type="warning">
**Warning**: If you have generated a worker with the same `<workerName>` before, `allocmd` will hang and not be able to generate your worker files. Please change the `<workerName>` to a new name and try the command again!
</Callout>

Before running this command you will have to [pick the topic Id](/devs/get-started/existing-topics) you wish to generate inference for after which you can run this command with the topic Id. The command will auto-create some files, the most important of which is the `dev-docker-compose.yaml`file which is an already complete docker-compose that you can run immediately to see your worker and head nodes running on your local machine. You can edit the files as you wish. For instance, the `main.py` is meant for you to call your inference server, hence you will have to edit the sample code with actual URLs and logic as you prefer.

After you have written and tested your logic in `main.py`, you can then run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ docker run -it --entrypoint=bash -v ./worker-data:/data alloranetwork/allora-inf

After both worker and head nodes' identities are generated inside the `head-data/keys` and `worker-data/keys` directories, instruct the worker node to connect to the head node:

- run `cat head-data/head/keys/identity` to extract the head node's peer_id specified in the `head-data/keys/identity`
- run `cat head-data/keys/identity` to extract the head node's peer_id specified in the `head-data/keys/identity`
- use the printed peer_id to replace the `head-id` placeholder value specified inside the `docker-compose.yml` file when running the worker service: `--boot-nodes=/ip4/172.22.0.100/tcp/9010/p2p/<head-id>`

### Run setup
Expand Down

0 comments on commit e6f5c80

Please sign in to comment.