If you have multiple GPUs in a single computer, you can optimize performance by starting multiple nodes on the computer and assigning each GPU to a different node.
To enable GPU assignment, use the Docker version of Crynux Node. For a guide on the basics of starting a Crynux Node as a Docker container, please refer to the tutorial below:
If you want to assign a specific GPU to a node, you must find the ID of the GPU first. This can be done using the nvidia-smi toolkit. Start a terminal and run the following command:
$ nvidia-smi
And you will get the output similar to the following:
Find the ID as highlighted in the image above. In this case, we have a single GPU installed in the computer, the ID of the GPU is 0.
GPU assignment using Docker Compose
In the docker-compose.yml file, find the following section:
For example, if you have 3 GPUs on the same computer, just clone the docker compose project 3 times, after renaming the folders, you have 3 working folders locally:
$ ls
crynux_node_docker_compose_1 crynux_node_docker_compose_2 crynux_node_docker_compose_3
In each of the working folders, find the docker-compose.yml file, and edit the content:
1. Change the name, service name and the container name, so that every container is using a different one:
Finally, in each of the folders, run the docker compose up command to start the container:
$ cd crynux_node_docker_compose_1
$ docker compose up -d
$ cd ../crynux_node_docker_compose_2
$ docker compose up -d
$ cd ../crynux_node_docker_compose_3
$ docker compose up -d