10gic / vanitygen-plusplus

A vanity address generator for BTC, ETH, LTC, TRX and 100+ more crypto currencies.
GNU Affero General Public License v3.0
248 stars 90 forks source link

Add a Dockerfile with CUDA support #37

Open canardleteer opened 2 years ago

canardleteer commented 2 years ago

Threw together a way to run this with OpenCL in a container.

10gic commented 1 year ago

I tested it, it compiles fine, but it doesn't run. OS Version: macOS Monterey Docker Version: Docker Desktop 4.12.0

$ sudo docker run -it --network none --gpus all vanitygen-plusplus:latest 1Love
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.
ERRO[0000] error waiting for container: context canceled

There are other people on the Internet who have encountered similar problems: https://forums.docker.com/t/nvidia-cuda-doesnt-work-on-docker-desktop-but-works-on-docker-engine/130668

canardleteer commented 1 year ago

I've only tested it against the NVIDIA container-toolkit on Ubuntu 22 (possibly 20 since I initially did it 5 months back) as the container host directly on x86 hardware, and am not familiar with the GPU pass-through runtimes for Docker on macOS at all... so I'm not too sure.

I suppose I could add a note that it's only been tested on Ubuntu 20/22? I also don't have macOS to experiment with.