Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
/ bcnode-gpu-docker Public archive

Running a Block Collider blockchain node and a CUDA GPU miner in containers.

Notifications You must be signed in to change notification settings

trick77/bcnode-gpu-docker

Repository files navigation

What's this about?

Mining on Block Collider's blockchain with LG's CUDA RPC miner in a Docker container.

Prerequisites

  1. Linux-capable x86_64 PC with at least 10 GB RAM
    1. It doesn't need a fast CPU but something faster than an Atom/Celeron may be required for low latency rovering.
    2. SSD always helps.
  2. At least one CUDA compatible Nvidia GPU.
  3. Preferably a low latency Internet connection.
  4. Some basic Linux skills.

Installation

In a nutshell:

  1. Install Debian 10 Buster as the host OS.
  2. Install the appropriate tools like apt-get install -y git wget curl ca-certificates jq
  3. Install Docker from https://docs.docker.com/install/linux/docker-ce/debian/
  4. Install Nvidia's CUDA Drivers from https://us.download.nvidia.com/tesla/450.80.02/NVIDIA-Linux-x86_64-450.80.02.run
    1. It must be this version of the nvidia driver to function!
    2. Do not run the full CUDA installer from nvidia on the host machine unless you really know what you're doing!
  5. Install https://github.com/NVIDIA/nvidia-docker
  6. This might be a good time for a system reboot.
  7. git clone https://github.com/trick77/bcnode-gpu-docker bcnode-gpu-docker && cd $_
  8. Build the Docker images locally using ./build-images.sh (grab an 0xc0ffee since this will take a while)
  9. Open the ./config file and edit at least your your miner key
  10. If the image build was a success, start the containers with the provided ./start.sh in this directory

Unfortunately, we can't use docker-compose for the whole thing yet since it doesn't support the required gpu flag.

Gotchas:

  1. Watch for errors if sudo is not installed. While sudo is not required it's contained in some of the manual installation instructions.
  2. The provided start script will output if Docker is able to find a compatible GPU on the host. If the output doesn't show any compatible GPU, you have to fix this first.
  3. You want to re-run ./build-images.sh whenever a new blockcollider/bcnode image is released or you will mine on an outdated version rather sooner than later.
  4. Yes, building the images locally takes some effort. However, do not rely on prebuilt 3rd party docker images. You don't know what code changes were made. You could easily be mining to someone else's wallet.
  5. If something doesn't work, don't complain about it. Analyze it, fix it, improve it, submit a pull request.
  6. You didn't read this README.

Tips & tricks

  • If you want to save time for rebuilding the images, always pass the --nopurge parameter to the build-images.sh script. This will use more diskspace though.
  • To see what bcnode is currently doing use docker logs -f bcnode --tail 100, abort the output with CTRL-C (this will not terminate the process)
  • From time to time, you may want to run a docker system prune -f to remove old images and free up disk space.
  • Use docker volume rm db to get rid of the blockchain database and start syncing from scratch. You obviously want to do this when the bcnode container is not currently running.

Thanks

Kudos go out to all the nerds in our little BC GPU miner tester community for their know-how, tech and moral support.

About

Running a Block Collider blockchain node and a CUDA GPU miner in containers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages