Skip to content
Guy Davis edited this page Aug 21, 2023 · 12 revisions

At the beginning of 2023, the Chia blockchain took a turn that meant more hardware was needed to plot and farm efficiently. Where before just a mid-range computer with an average CPU and an SSD could plot and farm, with the advent of Gigahorse and the subsequent attempts by Bladebit to keep up, a GPU became a helpful add-on for plotting and farming.

As of 2023-08-20, here is the current support:

Platform Plotting Support Farming Supported
Chia/Bladebit Yes (Nvidia - alpha) Yes (Nvidia)
Chia/Gigahorse Yes (Nvidia & AMD) Yes (Nvidia & AMD)
MMX/Madmax Yes Yes (Nvidia, AMD, Intel)

Nvidia

You'll need the Nvidia Driver Runtime. On Unraid, just install the Nvidia Driver plugin.

Then please add the following to your docker-compose.yml. Extend the existing environment section

        environment:
            - OPENCL_GPU=nvidia
            - NVIDIA_VISIBLE_DEVICES=all
            - NVIDIA_DRIVER_CAPABILITIES=compute,utility

Then add a new runtime line, (at same level as environment):

        runtime: nvidia

OR for Unraid, using the Docker admin tab, edit the container config (machinaris, machinaris-mmx, or machinaris-Gigahorse), create 3 new Variables (shown) and add --runtime=nvidia to the "Extra Parameters" field.

Alternatively, you can target the device by either position/index or GUID using these ONE of these TWO Variables values:

  • NVIDIA_VISIBLE_DEVICES=0
  • NVIDIA_VISIBLE_DEVICES=GPU-a8b96998-xxxx-xxxx

Further explained here.

You should then be able to execute nvidia-smi and see your GPU details from inside the container.

Nvidia

AMD

For AMD GPUs, as per this tutorial (AMD section part-way down), please add the following to your docker-compose.yml. Extend the existing environment section

        environment:
            - OPENCL_GPU=amd
            - ROC_ENABLE_PRE_VEGA=1

and add the following devices section at the same level as environment:

        devices:
            - "/dev/kfd:/dev/kfd"
            - "/dev/dri/:/dev/dri/"

Intel iGPU

Extend the existing environment section

        environment:
            - OPENCL_GPU=intel

and add the following devices section at the same level as environment:

        devices:
            - "/dev/dri/:/dev/dri/"

On the host machine, add the user that runs the container to the "video" and "render" groups.

sudo adduser $USER video
sudo adduser $USER render

To see if it worked, after the container starts, connect to it and type "clinfo"

docker exec -it machinaris-mmx bash
clinfo

You should see something like:

root@localhost:/chia-blockchain# clinfo 
Number of platforms                               1
  Platform Name                                   Intel(R) OpenCL HD Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 3.0 
  Platform Profile                                FULL_PROFILE
Clone this wiki locally