-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from ritual-net/sr/infernet-cli-implementation-1
[main-1] Infernet CLI implementation
- Loading branch information
Showing
49 changed files
with
2,663 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
infernet_services/services/css_inference_service/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
eth-abi>=5.1.0,<6.0.0 | ||
infernet-ml>=2.0.0.81,<3.0.0 | ||
infernet-ml[css_inference]>=2.0.0.81,<3.0.0 | ||
infernet-ml>=2.0.0,<3.0.0 | ||
infernet-ml[css_inference]>=2.0.0,<3.0.0 | ||
quart>=0.19.4,<1.0.0 | ||
python-dotenv>=1.0.1,<2.0.0 | ||
pydantic>=2.5.3,<3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
infernet_services/services/hf_inference_client_service/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
click>=8.1.7,<9.0.0 | ||
eth-abi>=5.1.0,<6.0.0 | ||
infernet-ml>=2.0.0.81,<3.0.0 | ||
infernet-ml[hf_inference]>=2.0.0.81,<3.0.0 | ||
infernet-ml>=2.0.0,<3.0.0 | ||
infernet-ml[hf_inference]>=2.0.0,<3.0.0 | ||
quart>=0.19.4,<1.0.0 | ||
pydantic>=2.5.3,<3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
infernet_services/services/onnx_inference_service/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
click>=8.1.7,<9.0.0 | ||
eth-abi>=5.1.0,<6.0.0 | ||
quart>=0.19.4,<1.0.0 | ||
infernet-ml>=2.0.0.81,<3.0.0 | ||
infernet-ml[onnx_inference]>=2.0.0.81,<3.0.0 | ||
infernet-ml[onnx_inference_gpu]>=2.0.0.81,<3.0.0; platform_system != "Darwin" | ||
infernet-ml>=2.0.0,<3.0.0 | ||
infernet-ml[onnx_inference]>=2.0.0,<3.0.0 | ||
infernet-ml[onnx_inference_gpu]>=2.0.0,<3.0.0; platform_system != "Darwin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
infernet_services/services/tgi_client_inference_service/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
eth-abi>=5.1.0,<6.0.0 | ||
infernet-ml>=2.0.0.81,<3.0.0 | ||
infernet-ml[tgi_inference]>=2.0.0.81,<3.0.0 | ||
infernet-ml>=2.0.0,<3.0.0 | ||
infernet-ml[tgi_inference]>=2.0.0,<3.0.0 | ||
quart>=0.19.4,<1.0.0 | ||
pydantic>=2.5.3,<3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
infernet_services/services/torch_inference_service/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
infernet-ml>=2.0.0.81,<3.0.0 | ||
infernet-ml[torch_inference]>=2.0.0.81,<3.0.0 | ||
infernet-ml>=2.0.0,<3.0.0 | ||
infernet-ml[torch_inference]>=2.0.0,<3.0.0 | ||
quart>=0.19.4,<1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Flask>=3.0.0,<4.0.0 | ||
gunicorn>=21.2.0,<22.0.0 | ||
web3>=6.17.1,<7.0.0 | ||
infernet-ml>=2.0.0.81,<3.0.0 | ||
infernet-ml>=2.0.0,<3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**/deploy/** | ||
**/backup/** | ||
|
||
# docs reference | ||
docs/reference/ | ||
|
||
mkdocs.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.11.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
- ##### The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). | ||
- ##### This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.0.0] - XXXX-XX-XX | ||
|
||
### Added | ||
- Initial release of Infernet CLI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
update-lockfile: | ||
uv venv -p 3.11 && source .venv/bin/activate && \ | ||
uv pip install -r pyproject.toml && \ | ||
uv pip freeze | grep -v infernet_cli > requirements.lock && rm -rf .venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Infernet CLI | ||
|
||
See [infernet-cli.docs.ritual.net](infernet-cli.docs.ritual.net) or refer to `infernet_cli/docs`. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
site_name: Infernet CLI | ||
site_description: Infernet CLI Documentation | ||
|
||
nav: | ||
- Usage: usage.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
|
||
# Infernet CLI | ||
|
||
Infernet CLI is a tool that simplifies configuration and deployment of an [Infernet Node](https://github.com/ritual-net/infernet-node). Specifically, it enables: | ||
|
||
1. Pulling plug-and-play [node configurations](https://github.com/ritual-net/infernet-recipes/tree/main/node) for different chains, with the ability to further configure and customize them. | ||
2. Adding plug-and-play [service configurations](https://github.com/ritual-net/infernet-recipes/tree/main/services) to your node. | ||
3. Creating, managing, and destroying a node. | ||
|
||
## Prerequisites | ||
|
||
- [Python >= 3.9](https://www.python.org/downloads/) | ||
- [Docker Desktop](https://docs.docker.com/get-started/get-docker/) or ([Docker Engine](https://docs.docker.com/engine/install/) + [Docker Compose](https://docs.docker.com/compose/install/)). | ||
|
||
## Installation | ||
You can either install `infernet-cli` via [`uv`](https://astral.sh/blog/uv) (recommended) or via `pip`. | ||
|
||
=== "uv" | ||
|
||
``` bash | ||
uv pip install infernet-cli | ||
``` | ||
|
||
=== "pip" | ||
|
||
``` bash | ||
pip install infernet-cli | ||
``` | ||
|
||
## Quickstart | ||
|
||
Here's how you can **configure** a node connected to a local Anvil chain: | ||
|
||
```bash | ||
export DEPLOY_DIR=deploy/ | ||
|
||
infernet-cli config anvil --skip | ||
``` | ||
|
||
The output will look something like this: | ||
|
||
``` | ||
No version specified. Using latest: v1.3.0 | ||
Using configurations: | ||
Chain = 'anvil' | ||
Version = '1.3.0' | ||
GPU support = disabled | ||
Output dir = 'deploy' | ||
Stored base configurations to '/root/deploy'. | ||
To configure services: | ||
- Use `infernet-cli add-service` | ||
- Or edit config.json directly | ||
``` | ||
|
||
You can add an ML service, e.g. `onnx-inference`, as follows: | ||
|
||
```bash | ||
infernet-cli add-service onnx-inference --skip | ||
``` | ||
|
||
The output will look something like this: | ||
|
||
``` | ||
Version not provided. Using latest version '2.0.0'. | ||
Successfully added service 'onnx-inference-2.0.0' to config.json. | ||
``` | ||
|
||
You can then **deploy** the node: | ||
|
||
```bash | ||
infernet-cli start | ||
``` | ||
|
||
and check that it's **healthy**: | ||
|
||
```bash | ||
infernet-cli health | ||
``` | ||
|
||
## More Options | ||
|
||
To see all the available commands and options, head over to the [Usage](usage.md) documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block extrahead %} | ||
{% set title = config.site_name %} | ||
{% if page and page.meta and page.meta.title %} | ||
{% set title = title ~ " - " ~ page.meta.title %} | ||
{% elif page and page.title and not page.is_homepage %} | ||
{% set title = title ~ " - " ~ page.title | striptags %} | ||
{% endif %} | ||
<meta property="og:type" content="website"/> | ||
<meta property="og:title" content="{{ title }}"/> | ||
<meta property="og:description" content="{{ config.site_description }}"/> | ||
<meta property="og:url" content="https://infernet-cli.docs.ritual.net"/> | ||
<meta property="og:image" content="https://infernet-cli.docs.ritual.net/assets/meta.png"/> | ||
|
||
<meta property="twitter:card" content="summary_large_image"/> | ||
<meta property="twitter:url" content="https://infernet-cli.docs.ritual.net"/> | ||
<meta property="twitter:title" content="Infernet CLI"/> | ||
<meta property="twitter:description" content="Configuration and deploy of Infernet Nodes"/> | ||
<meta property="twitter:image" content="https://infernet-cli.docs.ritual.net/assets/meta.png"/> | ||
|
||
<meta property="og:image:type" content="image/png"/> | ||
<meta property="og:image:width" content="2400"/> | ||
<meta property="og:image:height" content="1350"/> | ||
{% endblock %} |
Oops, something went wrong.