WARNING: This guide is outdated - the official GPU plotter has been released!
NOTE: You must be on Ubuntu 24.04 for this guide!!
NOTE 2: For my Threadripper system I had to disable Secure Boot (set to Other OS) in order for the NVIDIA drivers to work.
This morning Nazar dropped a bomb in the Discord and the EXPERIMENTAL release of the GPU plotter was released. I can safely report that I have it working… and. its. awesome! If you have a 2000 series card or better it should work!
I am using an RTX3070 and with 60% GPU usage I am cranking out 3.14 sectors per minute. In the discord there is a 4090 reporting 5.7 sectors per minute. Dual 4090 are getting 10 sectors per minute. As more GPUs trickle in we will get some better data, but it looks promising.
So how to get it? Well this guide is valid as of September 7th, but things may change and I will continue to put out guides ASAP so stay subscribed and check for updates!
I use Docker, so this is going to be based on using Docker on Ubuntu 24.04. It appears you can safely use the GPU plotter with everything on September 3rd release.
Latest NVIDIA Drivers
I started on the 535 drivers but I received a fatal error and could not plot. Updating to 560 fixed it and it works great. So I suggest getting the latest drivers. You can download the local repo deb here:
https://us.download.nvidia.com/tesla/560.35.03/nvidia-driver-local-repo-ubuntu2404-560.35.03_1.0-1_amd64.deb
Then install it with:
sudo dpkg -i nvidia-driver-local-repo-ubuntu2404-560.35.03_1.0-1_amd64.deb
This will add the repo to your system. Then run
sudo apt update
And then finally:
sudo apt install nvidia-driver-560
I did not have to uninstall my 535 drivers prior to this. After everything is installed reboot the PC.
Now since we will be doing this in Docker, we need to be able to pass the GPUs to the Docker container. First install the Docker NVIDIA Toolkit:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
Just paste that whole thing in and hit enter. Then run
sudo apt update
Then install the toolkit
sudo apt-get install -y nvidia-container-toolkit
Next add the nvidia runtime to Docker
sudo nvidia-ctk runtime configure --runtime=docker
And finally restart Docker
sudo systemctl restart docker
Boom now we just need to build the gpu-plotter Docker image. This is easy! First clone the subspace repo
git clone --branch gpu-plotting https://github.com/autonomys/subspace.git
Then move into the directory:
cd subspace
Now we need to build the image:
docker buildx build --progress plain -t autonomys-gpu-farmer -f Dockerfile-farmer .
Make sure to include that final period in the previos command. This may take some time depending on how fast your system is. Be patient. Oh by the way, this should be done on the system that you will be running the plotter, because the image will be available right away to swap out the official image.
Once the build is complete, you should be able to see it with
docker image ls
It’s there!
Okay now all we have to do update our plotter to use the nvidia runtime, and use the GPU. We also want to turn off the CPU plotter (at least I recommend it)
This is my stack file:
farmer_plotter:
container_name: autonomys_plotter
image: autonomys-gpu-farmer
command:
[
"cluster",
"--nats-server", "nats://172.25.0.101:4222",
"plotter",
"--cpu-sector-encoding-concurrency", "0"
]
environment:
- TZ=America/Phoenix
labels:
com.spaceport.name: "Bender Plotter"
networks:
autonomys-network:
ipv4_address: 172.25.0.105
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
runtime: nvidia
The big changes are adding “—cpu-sector-encoding-concurrency”, “0” after the “plotter” to turn off the CPU, the “deploy” section and the “runtime: nvidia” section. Make whatever changes you need to update your plotter and deploy it. Everything should work assuming your piece cache has synced.
NOTE: I do not know if it is required, but I updated my Plotter, Cache, Controller, and Farmer to all be running the autonomys-gpu-farmer image I built. You might be able to just update the Plotter but I am not sure.
You should see “Using CUDA GPUs used_cuda_devices=[0]” or you may see more than just 0 depending on many GPUs you have. 0 is referencing the device index, so if you have 2 GPUs you will see devices=[0,1].
And that is it! Remember this is experimental. Do not expect everything to work, we are getting a jump on things with the caveat being that it may not work, so do not expect too much support in the Discord.
seems like unable to git clone --branch gpu-plotting