Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dria: add DKN compute node #556

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Also, follow [@akashnet\_](https://twitter.com/akashnet_) to stay in the loop wi
- [ChatChat](chatchat)
- [ChatGPT Self-Hosted Chat](ai-chat-app)
- [Daila](daila)
- [Dria](dria)
- [Flowise](flowise)
- [GPT4ALL](gpt4all)
- [Serge](serge-cpu)
Expand Down
11 changes: 11 additions & 0 deletions dria/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dria Compute Node

A [Dria](https://dria.co/) Compute Node is a unit of computation within the Dria Knowledge Network. It's purpose is to process tasks given by the Dria Admin Node, and receive rewards for providing correct results.

## Setup

Check [dkn-compute-node](https://hub.docker.com/r/firstbatch/dkn-compute-node/tags) Docker repository to see if there is a new version and update `dkn` service `image`.

You need to provide an Ethereum wallet private key in `DKN_WALLET_SECRET_KEY` environment variable. The walelt address derived from this key represents your identity in Dria network.

You can also modify models supported by your node in `DKN_MODELS` environment variable. Consult the [guide](https://firstbatch.notion.site/How-to-Run-a-Node-ed2bef2c8eec4dd280286f2e081e51d2) to see the options.
95 changes: 95 additions & 0 deletions dria/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
version: "2.0"

services:
dkn:
image: firstbatch/dkn-compute-node:master-3fe904d-1724095365
expose:
- port: 80
as: 80
to:
- global: true
env:
# You need to provide a wallet private key here
- DKN_WALLET_SECRET_KEY=
# You can modify list of supported/enabled models - check the resources, might need a bump with more/different models
- DKN_MODELS=,llama3.1:latest

# You can provide API keys to integrate with other services
- OPENAI_API_KEY=
- SERPER_API_KEY=
- BROWSERLESS_TOKEN=
- ANTHROPIC_API_KEY=


# You probably don't want to touch these
- OLLAMA_AUTO_PULL=true
- OLLAMA_HOST=http://ollama
- OLLAMA_PORT=11434
- RUST_LOG=none,dkn_compute=info

- DKN_ADMIN_PUBLIC_KEY=0208ef5e65a9c656a6f92fb2c770d5d5e2ecffe02a6aade19207f75110be6ae658

ollama:
image: ollama/ollama@sha256:532b563c005c1d60cf959d498418e0d3b5cc1f02f6a1608ae7d0c0a8a3c8a2f5 #this is the image `latest` pointed to on 2024-08-19, update if needed
expose:
- port: 11434
as: 11434
to:
- global: false
- service: dkn
params:
storage:
ollamadata:
mount: /root/.ollama
readOnly: false
profiles:
compute:
dkn:
resources:
cpu:
units: 2
memory:
size: 2Gi
storage:
- size: 1Gi
ollama:
resources:
cpu:
units: 4
memory:
size: 10Gi
storage:
- size: 10Gi
- name: ollamadata
size: 24Gi
attributes:
persistent: true
class: beta3
gpu:
units: 1
attributes:
vendor:
nvidia:
- model: rtx4090
ram: 24Gi
interface: pcie
placement:
dcloud:
pricing:
dkn:
denom: uakt
amount: 100000
ollama:
denom: uakt
amount: 100000
deployment:
dkn:
dcloud:
profile: dkn
count: 1
ollama:
dcloud:
profile: ollama
count: 1