OTHER PROJECTS UOMI (GPU) InstallationOfficially stated requirements: 2/4/100 ubuntu 22.04
IMPORTANT:
The validator requires a server with a video card (cards) that has 48 GB of video memory!!!
This guide is suitable for ubuntu 24.04
Server preparation
Copy apt update && apt upgrade -y
Copy apt install curl build-essential git wget jq make gcc tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev libclang-dev -y
Ports used
Copy AI runs on port 8888
# validator
ufw allow 30333 comment p2p
ufw allow 9944 comment rpc
ufw allow 9615 comment prometheus
Install python 3.10
Copy apt install software-properties-common -y
add-apt-repository ppa:deadsnakes/ppa
# enter
apt install python3.10
python3.10 --version
#
AI Installation
Clone the repository for AI
Copy git clone https://github.com/Uomi-network/uomi-node-ai
Create a directory for the validator database
Install miniconda
Copy mkdir -p /root/miniconda3/
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /root/miniconda3/miniconda.sh
chmod +x /root/miniconda3/miniconda.sh
bash /root/miniconda3/miniconda.sh -b -u -p /root/miniconda3
Copy tmux new-session -s miniconda3
Copy source /root/miniconda3/etc/profile.d/conda.sh
conda create -n uomi-ai python=3.10 -y
conda activate uomi-ai
Install the necessary software
Copy conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=12.1 -c pytorch -c nvidia
# make sure PyTorch CUDA is installed correctly
python -c "import torch; print(torch.cuda.is_available())"
#True
# install CUDA toolkit and NVCC compiler
conda install -c nvidia/label/cuda-12.1.0 cuda-nvcc=12.1 cuda-toolkit=12.1
nvcc --version
Install additional dependencies
Copy conda install numpy=1.24
pip install flask
pip install psutil
pip install transformers
pip install 'accelerate>=0.26.0'
pip install autoawq
pip install 'triton==3.2.0'
pip install diffuser
Create a service file
Copy nano /etc/systemd/system/uomi-ai.service
Copy [Unit]
Description=UOMI AI API Server
After=network.target
[Service]
User=root
WorkingDirectory=/root/uomi-node-ai
ExecStart=/bin/bash -c "source /root/miniconda3/etc/profile.d/conda.sh && conda activate uomi-ai && python3 uomi-ai.py"
Restart=always
RestartSec=10
TimeoutSec=30
StartLimitIntervalSec=500
StartLimitBurst=5
[Install]
WantedBy=multi-user.target
Copy systemctl daemon-reload
systemctl enable uomi-ai.service
systemctl restart uomi-ai.service && journalctl -u uomi-ai.service -f
Validator setup
Download genesis
Copy wget -O /usr/local/bin/genesis.json "https://github.com/Uomi-network/uomi-node/releases/download/v0.1.7/genesis.json"
chmod +x /usr/local/bin/genesis.json
sha256sum /usr/local/bin/genesis.json
#ac62c78e9465fdb25fce6e98138fd497089042785ac4bac70d75d379efddfb49
Download the binary file
Copy wget -O /usr/local/bin/uomi "https://github.com/Uomi-network/uomi-node/releases/download/v0.2.1/uomi_ubuntu_24"
chmod +x /usr/local/bin/uomi
uomi --version
#uomi 0.2.1-3034d9f1deb
Create a wallet and save the output
Copy uomi key generate --scheme Sr25519
Copy # output example
#Secret phrase: tackle rebuild neither turn degree real capital armed giraffe novel resist human
#Network ID: substrate
#Secret seed: 0x5c9499827e606bcf284e8a650a96ce13ebf0484bd64a280507ff96d99da6e174
#Public key (hex): 0x14ceec080a6aa464b4235dd951a85669d25e4fa659578f01a7a7dc5c95454931
#Account ID: 0x14ceec080a6aa464b4235dd951a85669d25e4fa659578f01a7a7dc5c95454931
#Public key (SS58): 5CXzHQ3DmYKemRAyY6NPyKsDWiChbeeKtxW3q5RWpmdUQvdR
#SS58 Address: 5CXzHQ3DmYKemRAyY6NPyKsDWiChbeeKtxW3q5RWpmdUQvdR
Be sure to save the wallet output. We will need the data later
Generate the Ed25519 key for GRANDPA using your seed phrase obtained above
Copy uomi key inspect --scheme Ed25519 "<YOU_SEED>"
Be sure to save the wallet output. We will need the data later
Create a service file
Copy nano /etc/systemd/system/uomi.service
Copy [Unit]
Description=Uomi Node
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
Group=root
Restart=always
RestartSec=10
LimitNOFILE=65535
ExecStart=/usr/local/bin/uomi \
--validator \
--name "<MONIKER>" \
--chain "/usr/local/bin/genesis.json" \
--base-path "/root/uomi" \
--state-pruning 1000 \
--blocks-pruning 1000 \
--enable-evm-rpc \
--rpc-cors all \
--prometheus-external \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0"
# Hardening
ProtectSystem=strict
PrivateTmp=true
PrivateDevices=true
NoNewPrivileges=true
ReadWritePaths=/root/uomi
[Install]
WantedBy=multi-user.target
Copy systemctl daemon-reload
systemctl enable uomi.service
systemctl restart uomi.service && journalctl -u uomi.service -f
IMPORTANT - if the node cannot connect to peers, then add a backup peer to the service file
Copy --reserved-nodes "/ip4/5.9.87.231/tcp/30333/p2p/12D3KooWCAChuDHHpNER855r6NpAGDeLrSZ4U3sP6FocSWWJZDf5"
Adding Keys STEP 1
Once your node is up and running, paste your keys
NOTE - replace SECRET_PHRASE and PUBLIC KEY (hex) with your data obtained with the first command "key generate --scheme Sr25519"
Copy for key_type in babe imon uomi ipfs; do
curl -H "Content-Type: application/json" \
-d '{"id":1, "jsonrpc":"2.0", "method":"author_insertKey", "params":["'$key_type'", "SECRET_PHRASE", "PUBLIC_KEY"]}' \
http://localhost:9944
done
Adding Keys STEP 2
NOTE - replace SECRET_PHRASE and PUBLIC KEY (hex) with your data obtained using the second command "key inspect --scheme Ed25519"
Copy curl -H "Content-Type: application/json" \
-d '{"id":1, "jsonrpc":"2.0", "method":"author_insertKey", "params":["gran", "SECRET_PHRASE", "PUBLIC_KEY"]}' \
http://localhost:9944
Finally after the node is fully synced run the following command to generate session keys when creating a validator in polkadot js
Copy curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944