LC:
OS Requirements
Our code is compatible across various operating systems, yet it has undergone most of its testing on Debian 11, Ubuntu 20 and Arch Linux. The most rigorous testing environment used is the Deep Learning VM Image, which includes pre-installed ML frameworks and tools essential for development.
NOTE: the linux image should come with pytorch 2.1+ and CUDA 12.1.1 otherwise you might have problems with running miner or validator pipelines.
Setup Guidelines for Miners and Validators
Environment Management With Conda
For optimal environment setup:
Prefer Conda for handling dependencies and isolating environments. It’s straightforward and efficient for project setup.
If Conda isn’t viable, fallback to manual installations guided by conda_env_*.yml files for package details, and use requirements.txt. Utilizing a virtual environment is highly advised for dependency management.
Process Supervision With PM2
To manage application processes:
Adopt PM2 for benefits like auto-restarts, load balancing, and detailed monitoring. Setup scripts provide PM2 configuration templates for initial use. Modify these templates according to your setup needs before starting your processes.
If PM2 is incompatible with your setup, but you're using Conda, remember to activate the Conda environment first or specify the correct Python interpreter before executing any scripts.
Running the Miner
By running a miner on this subnet you agree that you have obtained all licenses, rights and consents required to use, reproduce, modify, display, distribute and make available your submitted results to this subnet and its end users.
To operate the miner, the miner neuron and generation endpoints must be initiated. While currently supporting a single generation endpoint, future updates are intended to allow a miner to utilize multiple generation endpoints simultaneously.
Generation Endpoints
Set up the environment by navigating to the directory and running the setup script:
cd three-gen-subnet/generation
.
/setup_env.sh
This script creates a Conda environment three-gen-mining, installs dependencies, and sets up a PM2 configuration file (generation.config.js).
After optional modifications to generation.config.js, initiate it using PM2:
pm2 start generation.config.js
To verify the endpoint's functionality generate a test video:
curl -d "prompt=pink bicycle" -X POST
http://127.0.0.1:8093/generate_video/ > video.mp4