Skip to content

firstbatchxyz/dkn-compute-launcher

Repository files navigation

dria-logo

Dria Compute Launcher

A launcher, editor, and version manager for Dria Compute Node.

License: Apache-2.0 Workflow: Tests Downloads MSRV Discord

The Dria Compute Launcher is a simple and efficient way to set up and run the Dria Compute Node. The launcher automatically handles environment setup, model selection, and binary management, making it easy to start the node with minimal configuration.

It is packed with many features:

  • Settings Menu: You can change various settings such as your wallet, ports and API keys, all without leaving the launcher. You can also open a raw text-editor in terminal.
  • Model Selection: You can choose your models with a nice menu.
  • Model Benchmarking: You can measure TPS for Ollama models to see if your machine can handle them.
  • Automatic Updates: Launcher will automatically update a running compute node when there is an update & restart it; furthermore, it will update itself when there is a new launcher as well!
  • Version Control: You can select & run a specific compute node release.
  • Auto-detect Ollama: Launcher will check Ollama if you are using it's model, and start its server if required.

Installation

Linux / MacOS

Open a terminal and run the following command:

curl -fsSL https://dria.co/launcher | bash

Windows

Open the Windows terminal cmd.exe in Administrator mode, and run the following command:

powershell -c "irm https://dria.co/launcher.ps1 | iex"

You may need to allow network access to the launcher if Windows prompts you to do so.

Build from Source

You can build from source using Rust & install the launcher globally using the command below:

cargo install --git https://github.com/firstbatchxyz/dkn-compute-launcher

The minimum supported rust version (MSRV) for the launcher is 1.81.0.

Usage

Double-click the executable or run it via the command line. The help to see available options:

# as a Unix executable
dkn-compute-launcher help

# as a Windows executable
dkn-compute-launcher.exe help

Caution

Some Apple devices need you to bypass macOS's security warning. If you see "macOS cannot verify that this app is free from malware" when using the launcher use the following command:

xattr -d com.apple.quarantine dkn-compute-launcher

All commands that you see with help have their own help messages within as well, you can view it with:

dkn-compute-launcher <some-command> --help

Model Providers

The purpose of running a Dria Compute Node is to serve LLMs to the network. These models can either be locally-hosted models via Ollama, or API-based models such as Gemini and OpenAI.

  • To serve API-based models (OpenAI, Gemini, OpenRouter), you will need to get their API keys.

  • To serve a locally-hosted model with Ollama, you of course need Ollama installed, and you must make sure that your machine can handle your chosen models. See "Measuring Local Models" chapter below to see the command-line tools that help you measure TPS.

Starting a Node

Start your node with start command:

dkn-compute-launcher start

Note

When you are running for the first time, the launcher will prompt you to fill in node information, such as your private key, chosen models and their respective provider information.

You can stop the node with CTRL+C (on Linux / Windows) or CMD+C (on macOS)

Referrals Program

You can earn $DRIA points if you refer other users! When you refer a user, for each point they earn you earn a portion of those points as well. To get a referral code, enter someone's referral code and such, use the following command:

dkn-compute-launcher referrals

Caution

Each referral code only has 5 uses! Once you have referred 5 users, your code will no longer work.

Changing Settings

You can use the settings command to change anything about your node:

dkn-compute-launcher settings

You will be greeted with a menu, where you can navigate with arrow keys and select an option with enter ENTER :

? Choose settings (for .env)
> Wallet
  Port
  Models
  Ollama
  API Keys
  Log Levels
  ✓ Save & Exit
  ✗ Abort Changes

Using this menu, you are able to change the following settings:

  • Wallet: change your secret key
  • Port: edit your listen address port, defaults to 4001
  • Models: view all models & edit the models that you want to serve
  • Ollama: edit host & port of the Ollama server
  • API Keys: change API keys for providers
  • Log Levels: change log-levels for modules within compute node & launcher

Within a menu, you can go back by selecting ← Go Back. Within the main menu, you can select ✓ Save & Exit to save your changes & write them to the environment file, or you can choose ✗ Abort Changes to abort all changes.

Tip

You can always exit the process (ungracefully) with CTRL+C (on Linux / Windows) or CMD+C (on macOS), or ESC on both systems.

Models Menu

When you select Model option in the Settings menu, you will be greeted with another menu:

? Choose model settings:
> Edit model selection
  List chosen models
  Remove local models
  Measure local models

Selecting Models

Click on Edit model selection to select models for your node.

? Select a model provider:
> ollama
  openai
  gemini
  openrouter
  VLLM
  ← Go Back

Here, you can select a provider to choose models served by them, where you will be greeted with the following menu:

> Select a model provider: openai
? Choose your models with SPACE, then press ENTER:
  [ ] gpt-4-turbo
  [x] gpt-4o
> [ ] gpt-4o-mini
  [ ] o1-mini
  [ ] o1-preview
  [ ] o1
  [ ] o3-mini
# ...

Within this menu you can navigate by using the arrow keys and press SPACE to select a model. You can select all models using , or de-select everything with . To finish selecting models, press ENTER.

When you are done selecting models for all providers, you can go back to the main menu by selecting ← Go Back.

Tip

You can pick List chosen models to show the list of models that you have picked for all providers.

Removing Local Models

When you run a node with local models, they are pulled to your machine and are stored within Ollama's files. You can remove them using Ollama commands, like:

# show downloaded models
ollama ls

# remove a model
ollama rm "model-name-here"

However, our launcher also provides a shortcut for that, you can pick the Remove local models option to choose models and remove them from your machine.

Measuring Local Models

You can test your machine's performance on locally served Ollama models by picking the Measure local models option.

Within Dria Knowledge Network, local models require you to reach a certain level of TPS. This command will measure your selected models, and then print a table of the results. We are particularly interested in Eval TPS and Total (ms) for our model performance.

Model                                Prompt TPS   Time (ms)    Eval TPS     Time (ms)    Total (ms)
qwen2.5-coder:1.5b                   40.7747      981          67.9260      2488         3496
deepseek-r1:1.5b                     21.4724      652          63.3591      16588        17255
driaforall/tiny-agent-a:1.5b         22.5653      842          47.1771      2586         3443

Measurements the fail to meet the Compute Node requirements will be colored in red.

Displaying $DRIA Points

Use the points command to display how much you have earned!

dkn-compute-launcher points

Updating Manually

Using the update command you can check for updates & automatically update your compute node and launcher.

dkn-compute-launcher update

You don't need to do this usually, as the launcher will always check for updates when you run the start command.

Editing Environment File

For more advanced users that would like to view the environment file in more detail & plain-text, we provide the env-editor command:

dkn-compute-launcher env-editor

This command will open the selected environment file using a terminal-native text editor, allowing you to edit everything in it. If there happens to be multiple keys for a single value in the environment, the settings command will edit the last uncommented key on Save.

Running a Specific Release

Using the specific command you can choose to run a specific release:

# select & download
dkn-compute-launcher specific

# run after downloading
dkn-compute-launcher specific --run

# specify tag, skipping the selection menu
dkn-compute-launcher specific --run --tag 0.3.4

This is completely optional, and should mostly be used for debugging and testing on the live network. When you run a specific release your node & launcher will not be automatically updated!

Caution

The Dria Knowledge Network always considers the latest minor version as the active version; therefore, if the latest is 0.3.x and you decide to run a smaller version like 0.2.x you will most likely kept out of network due to protocol mismatch.

Contributions

Contributions are welcome! You can start by cloning the repo:

git clone https://github.com/firstbatchxyz/dkn-compute-launcher

Development

The code is pretty laid-out, all commands are under commands and settings-related code is under settings.

Note

When the code is not --release mode, the used .env file will default to the local file, instead of the one under home directory, and launcher updates will be disabled so that you can work on your launcher without version mismatches.

Documentation

To see the launcher's internal documentation you can run:

cargo doc --open --no-deps --document-private-items

Uninstallation

You can uninstall the launcher binary along with the environment files and compute node binaries with the uninstall command:

dkn-compute-launcher uninstall

Caution

Make sure you backup your private key within .env before removing these files, so that you do not lose your hard-earned $DRIA points!

License

This project is licensed under the Apache License 2.0.