{"id":19947342,"url":"https://github.com/firstbatchxyz/dkn-compute-launcher","last_synced_at":"2025-05-03T17:33:47.090Z","repository":{"id":255502782,"uuid":"851548529","full_name":"firstbatchxyz/dkn-compute-launcher","owner":"firstbatchxyz","description":"Cross-platform launcher for Dria Compute Node.","archived":false,"fork":false,"pushed_at":"2025-05-01T10:04:44.000Z","size":536,"stargazers_count":28,"open_issues_count":8,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-01T11:20:19.454Z","etag":null,"topics":["dria","go","launcher"],"latest_commit_sha":null,"homepage":"https://dria.co/join","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firstbatchxyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-03T09:47:10.000Z","updated_at":"2025-05-01T10:04:47.000Z","dependencies_parsed_at":"2024-11-08T17:17:54.051Z","dependency_job_id":"e6811830-7acd-4a7b-8a3a-e55f28aec948","html_url":"https://github.com/firstbatchxyz/dkn-compute-launcher","commit_stats":null,"previous_names":["firstbatchxyz/dkn-compute-launcher"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdkn-compute-launcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdkn-compute-launcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdkn-compute-launcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdkn-compute-launcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstbatchxyz","download_url":"https://codeload.github.com/firstbatchxyz/dkn-compute-launcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252227170,"owners_count":21714956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dria","go","launcher"],"created_at":"2024-11-13T00:35:38.501Z","updated_at":"2025-05-03T17:33:47.084Z","avatar_url":"https://github.com/firstbatchxyz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/firstbatchxyz/.github/refs/heads/master/branding/dria-logo-square.svg\" alt=\"dria-logo\" width=\"168\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e\n    Dria Compute Launcher\n  \u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ci\u003eA launcher, editor, and version manager for Dria Compute Node.\u003c/i\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://opensource.org/license/apache-2-0\" target=\"_blank\"\u003e\n        \u003cimg alt=\"License: Apache-2.0\" src=\"https://img.shields.io/badge/license-Apache%202.0-7CB9E8.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"./.github/workflows/tests.yml\" target=\"_blank\"\u003e\n        \u003cimg alt=\"Workflow: Tests\" src=\"https://github.com/firstbatchxyz/dkn-compute-launcher/actions/workflows/tests.yml/badge.svg?branch=master\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/firstbatchxyz/dkn-compute-launcher/releases\" target=\"_blank\"\u003e\n        \u003cimg alt=\"Downloads\" src=\"https://img.shields.io/github/downloads/firstbatchxyz/dkn-compute-launcher/total?logo=github\u0026logoColor=%23F2FFEE\u0026color=%2332C754\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/foresterre/cargo-msrv\" target=\"_blank\"\u003e\n        \u003cimg alt=\"MSRV\" src=\"https://img.shields.io/badge/1.81.0-F74B01?logo=rust\u0026logoColor=white\u0026label=msrv\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/dria\" target=\"_blank\"\u003e\n        \u003cimg alt=\"Discord\" src=\"https://dcbadge.vercel.app/api/server/dria?style=flat\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nThe **Dria Compute Launcher** is a simple and efficient way to set up and run the [Dria Compute Node](https://github.com/firstbatchxyz/dkn-compute-node). The launcher automatically handles environment setup, model selection, and binary management, making it easy to start the node with minimal configuration.\n\nIt is packed with many features:\n\n- [x] **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.\n- [x] **Model Selection**: You can choose your models with a nice menu.\n- [x] **Model Benchmarking**: You can measure TPS for Ollama models to see if your machine can handle them.\n- [x] **Automatic Updates**: Launcher will automatically update a running compute node when there is an update \u0026 restart it; furthermore, it will update itself when there is a new launcher as well!\n- [x] **Version Control**: You can select \u0026 run a specific compute node release.\n- [x] **Auto-detect Ollama**: Launcher will check Ollama if you are using it's model, and start its server if required.\n\n## Installation\n\n**Linux / MacOS**\n\nOpen a terminal and run the following command:\n\n```sh\ncurl -fsSL https://dria.co/launcher | bash\n```\n\n**Windows**\n\nOpen the Windows terminal [cmd.exe](https://en.wikipedia.org/wiki/Cmd.exe) in Administrator mode, and run the following command:\n\n```sh\npowershell -c \"irm https://dria.co/launcher.ps1 | iex\"\n```\n\nYou may need to allow network access to the launcher if Windows prompts you to do so.\n\n### Build from Source\n\nYou can build from source using [Rust](https://www.rust-lang.org/) \u0026 install the launcher globally using the command below:\n\n```sh\ncargo install --git https://github.com/firstbatchxyz/dkn-compute-launcher --locked\n```\n\nThe [minimum supported rust version](https://github.com/foresterre/cargo-msrv) (MSRV) for the launcher is `1.81.0`. We use the `--locked` option to ensure you use the existing lockfile that is guaranteed to build.\n\n## Usage\n\nDouble-click the executable or run it via the command line. The `help` to see available options:\n\n```sh\n# as a Unix executable\ndkn-compute-launcher help\n\n# as a Windows executable\ndkn-compute-launcher.exe help\n```\n\n\u003e [!CAUTION]\n\u003e\n\u003e 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:\n\u003e\n\u003e ```sh\n\u003e xattr -d com.apple.quarantine dkn-compute-launcher\n\u003e ```\n\nAll commands that you see with `help` have their own help messages within as well, you can view it with:\n\n```sh\ndkn-compute-launcher \u003csome-command\u003e --help\n```\n\n### Model Providers\n\nThe 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.\n\n- To serve API-based models ([OpenAI](https://openai.com/), [Gemini](https://gemini.google.com/app), [OpenRouter](https://openrouter.ai/)), you will need to get their API keys.\n\n- To serve a locally-hosted model with [Ollama](https://ollama.com/), you of course need Ollama installed, and you must make sure that your machine can handle your chosen models. See [\"Measuring Local Models\"](#measuring-local-models) chapter below to see the command-line tools that help you measure TPS.\n\n### Starting a Node\n\nStart your node with `start` command:\n\n```sh\ndkn-compute-launcher start\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e When you are running for the first time, the launcher will prompt you to fill in\n\u003e node information, such as your private key, chosen models and their respective provider information.\n\nYou can stop the node with \u003ckbd\u003eCTRL+C\u003c/kbd\u003e (on Linux / Windows) or \u003ckbd\u003eCMD+C\u003c/kbd\u003e (on macOS)\n\n### Referrals Program\n\nYou 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.\nTo get a referral code, enter someone's referral code and such, use the following command:\n\n```sh\ndkn-compute-launcher referrals\n```\n\n\u003e [!CAUTION]\n\u003e\n\u003e Each referral code only has 5 uses! Once you have referred 5 users, your code will no longer work.\n\n### Changing Settings\n\nYou can use the `settings` command to change anything about your node:\n\n```sh\ndkn-compute-launcher settings\n```\n\nYou will be greeted with a menu, where you can navigate with arrow keys \u003ckbd\u003e↑\u003c/kbd\u003e \u003ckbd\u003e↓\u003c/kbd\u003e and select an option with enter \u003ckbd\u003eENTER\u003c/kbd\u003e :\n\n```yaml\n? Choose settings (for .env)\n\u003e Wallet\n  Port\n  Models\n  Ollama\n  API Keys\n  Log Levels\n  ✓ Save \u0026 Exit\n  ✗ Abort Changes\n```\n\nUsing this menu, you are able to change the following settings:\n\n- **Wallet**: change your secret key\n- **Port**: edit your listen address port, defaults to `4001`\n- **Models**: view all models \u0026 edit the models that you want to serve\n- **Ollama**: edit host \u0026 port of the Ollama server\n- **API Keys**: change API keys for providers\n- **Log Levels**: change log-levels for modules within compute node \u0026 launcher\n\nWithin a menu, you can go back by selecting \u003ckbd\u003e← Go Back\u003c/kbd\u003e. Within the main menu, you can select \u003ckbd\u003e✓ Save \u0026 Exit\u003c/kbd\u003e to save your changes \u0026 write them to the environment file, or you can choose \u003ckbd\u003e✗ Abort Changes\u003c/kbd\u003e to abort all changes.\n\n\u003e [!TIP]\n\u003e\n\u003e You can always exit the process (ungracefully) with \u003ckbd\u003eCTRL+C\u003c/kbd\u003e (on Linux / Windows) or \u003ckbd\u003eCMD+C\u003c/kbd\u003e (on macOS), or \u003ckbd\u003eESC\u003c/kbd\u003e on both systems.\n\n### Models Menu\n\nWhen you select \u003ckbd\u003eModel\u003c/kbd\u003e option in the Settings menu, you will be greeted with another menu:\n\n```py\n? Choose model settings:\n\u003e Edit model selection\n  List chosen models\n  Remove local models\n  Measure local models\n```\n\n#### Selecting Models\n\nClick on `Edit model selection` to select models for your node.\n\n```sh\n? Select a model provider:\n\u003e ollama\n  openai\n  gemini\n  openrouter\n  VLLM\n  ← Go Back\n```\n\nHere, you can select a provider to choose models served by them, where you will be greeted with the following menu:\n\n```sh\n\u003e Select a model provider: openai\n? Choose your models with SPACE, then press ENTER:\n  [ ] gpt-4-turbo\n  [x] gpt-4o\n\u003e [ ] gpt-4o-mini\n  [ ] o1-mini\n  [ ] o1-preview\n  [ ] o1\n  [ ] o3-mini\n# ...\n```\n\nWithin this menu you can navigate by using the arrow keys \u003ckbd\u003e↑\u003c/kbd\u003e \u003ckbd\u003e↓\u003c/kbd\u003e and press \u003ckbd\u003eSPACE\u003c/kbd\u003e to select a model. You can select all models using \u003ckbd\u003e→\u003c/kbd\u003e, or de-select everything with \u003ckbd\u003e←\u003c/kbd\u003e. To finish selecting models, press \u003ckbd\u003eENTER\u003c/kbd\u003e.\n\nWhen you are done selecting models for all providers, you can go back to the main menu by selecting \u003ckbd\u003e← Go Back\u003c/kbd\u003e.\n\n\u003e [!TIP]\n\u003e\n\u003e You can pick `List chosen models` to show the list of models that you have picked for all providers.\n\n#### Removing Local Models\n\nWhen 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:\n\n```sh\n# show downloaded models\nollama ls\n\n# remove a model\nollama rm \"model-name-here\"\n```\n\nHowever, 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.\n\n#### Measuring Local Models\n\nYou can test your machine's performance on locally served Ollama models by picking the `Measure local models` option.\n\nWithin 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.\n\n```sh\nModel                                Prompt TPS   Time (ms)    Eval TPS     Time (ms)    Total (ms)\nqwen2.5-coder:1.5b                   40.7747      981          67.9260      2488         3496\ndeepseek-r1:1.5b                     21.4724      652          63.3591      16588        17255\ndriaforall/tiny-agent-a:1.5b         22.5653      842          47.1771      2586         3443\n```\n\nMeasurements the fail to meet the Compute Node requirements will be colored in red.\n\n### Displaying $DRIA Points\n\nUse the `points` command to display how much you have earned!\n\n```sh\ndkn-compute-launcher points\n```\n\n### Updating Manually\n\nUsing the `update` command you can check for updates \u0026 automatically update your compute node and launcher.\n\n```sh\ndkn-compute-launcher update\n```\n\nYou don't need to do this usually, as the launcher will always check for updates when you run the `start` command.\n\n### Editing Environment File\n\nFor more advanced users that would like to view the environment file in more detail \u0026 plain-text, we provide the `env-editor` command:\n\n```sh\ndkn-compute-launcher env-editor\n```\n\nThis 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**.\n\n### Running a Specific Release\n\nUsing the `specific` command you can choose to run a specific release:\n\n```sh\n# select \u0026 download\ndkn-compute-launcher specific\n\n# run after downloading\ndkn-compute-launcher specific --run\n\n# specify tag, skipping the selection menu\ndkn-compute-launcher specific --run --tag 0.3.4\n```\n\nThis is completely optional, and should mostly be used for debugging and testing on the live network.\nWhen you run a specific release your node \u0026 launcher will **not** be automatically updated!\n\n\u003e [!CAUTION]\n\u003e\n\u003e The Dria Knowledge Network always considers the latest `minor` version as the active version; therefore,\n\u003e 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.\n\n## Contributions\n\nContributions are welcome! You can start by cloning the repo:\n\n```sh\ngit clone https://github.com/firstbatchxyz/dkn-compute-launcher\n```\n\n### Development\n\nThe code is pretty laid-out, all commands are under [`commands`](./src/commands/) and settings-related code is under [`settings`](./src/settings/).\n\n\u003e [!NOTE]\n\u003e\n\u003e 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\n\u003e will be disabled so that you can work on your launcher without version mismatches.\n\n### Documentation\n\nTo see the launcher's internal documentation you can run:\n\n```sh\ncargo doc --open --no-deps --document-private-items\n```\n\n## Uninstallation\n\nYou can uninstall the launcher binary along with the environment files and compute node binaries with the `uninstall` command:\n\n```sh\ndkn-compute-launcher uninstall\n```\n\n\u003e [!CAUTION]\n\u003e\n\u003e Make sure you backup your private key within `.env` before removing these files, so that you do not lose your hard-earned $DRIA points!\n\n## License\n\nThis project is licensed under the [Apache License 2.0](https://opensource.org/license/Apache-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstbatchxyz%2Fdkn-compute-launcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstbatchxyz%2Fdkn-compute-launcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstbatchxyz%2Fdkn-compute-launcher/lists"}