Start a Node - Docker

Start a node to join the Crynux Network using Docker images

This guide is used to start the Docker container on Windows and Linux (Ubuntu, etc), or on a cloud based VM such as AWS EC2. DO NOT use this guide on Docker based clouds such as Vast, follow the instructions in this doc instead.

0. Overview

  • Fill a form to tell us your GPU type, location, network bandwidth [No application form, no sign up, you don’t need to tell us]

  • Join waitlist and wait for the email from us [No waitlist, just install the Docker image, you can start earning CNX tokens right away]

  • Follow the steps below:

1. Prerequisite

Before you start, make sure your device meets the following requirements:

2. Install the software

Install the latest NVIDIA driver

Download the latest NVIDIA driver from the NVIDIA official website, and finish the installation.

Install the latest version of Docker

Download the latest version of the Docker Desktop, and finish the installation.

If you have 16GB of memory and use Docker with WSL2 on Windows

The memory limit for WSL is default to 8GB, which is not enough to run the Node. You will have to change the default settings using a .wslconfig file to allow WSL to use 16GB memory.

If you are running on Linux (Ubuntu/Fedora/CentOS/...)

Check the installation

a. Run the following command in the terminal to check the version of the docker engine:

$ docker --version

Make sure the returned version number is greater than 19.03.0:

Docker version 26.0.0, build 2ae903e

b. Run the following command in the terminal:

$ sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

You should get the info of the GPU from nvidia-smi like this:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 535.86.10    Driver Version: 535.86.10    CUDA Version: 12.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   34C    P8     9W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

If something goes wrong on the above steps, the problem is on the Docker or your operating system, please search the error message online for solutions.

3. Start the node using the Docker Compose

a. Get the Crynux Docker Compose project

you can use git to clone the project

$ git clone https://github.com/crynux-ai/crynux-node-docker-compose.git

or simply download the files from GitHub:

b. Start the container

In a terminal, navigate to the folder you just cloned or downloaded, and run the following command

$ cd crynux-node-docker-compose
$ docker compose up -d

c. Visit the WebUI in the browser

Open the browser and go to http://localhost:7412

You should see the WebUI of the Node:

4. Prepare the wallet

DO NOT use the Web UI to create or import private keys if you're accessing the Web UI from a remote machine.

You will loose your tokens!

If you're using HTTP protocol to access the WebUI, the connection is not encrypted, and the private key might be intercepted by a malicious middle man.

Instead, use an SSH connection in the terminal to transfer your private key to the node.

A wallet with enough test tokens must be provided to the node. If this is the first time you start a node, click the "Create New Wallet" button and follow the instructions to create a new wallet and finish the backup of the private keys.

Get the test CNX tokens from the Discord Server

Some test CNX tokens are required to start the node. The test CNX tokens can be acquired for free in the Discord server of Crynux:

In the happy-aigen-discussions channel of the Discord server, type in the following command in the input bar, DO NOT copy & paste the command, it only works when typed in using keyboard:

/user join

Then bind the wallet address using the following command:

/node wallet {wallet_address}

Remember to replace {wallet_address} with the wallet address you just created in the Web UI.

After a short while, the test CNX tokens should appear in your node wallet:

5. Wait for the system initialization to finish

If this is the first time you start a node, it could take quite a long while for the system to initialize. The most time consuming step is to download ~40GB of the commonly used model files from the Huggingface. The time may vary depending on your network speed.

After the models are downloaded, a test image generation task will be executed locally to examine the capability of your device. If the device is not capable to generate images, or the generation speed is too slow, the node will not be able to join the network. If the task is finished successfully, the initialization is completed:

6. Join the Crynux Network

The Crynux Node will try to join the network automatically every time it is started. After the transaction is confirmed on-chain, the node has successfully joined the network. When the node is selected by the network to execute a task, the task will start automatically, and the tokens will be transferred to the node wallet after the task is finished.

Now the Node is fully up and running. You could just leave it there to run tasks automatically.

The Node could be paused or stopped at any time by clicking the control buttons. If the node is in the middle of running a task, after clicking the buttons, the node will go into the "pending" status and continue with the running task. When the task is finished, the node will pause/stop automatically.

The difference between pausing and stopping is that pausing will not cause the staked CNX tokens to be returned, so that the transaction costs less gas fee than stopping. If you have a plan of going back, you could use pausing rather than stopping.

Last updated