Monero GPU mining in Docker with nvidia-docker

Patrick

Administrator
Staff member
Dec 21, 2010
11,938
4,892
113
For those who want an easy way to mine Monero (XMR) using Docker here is a simple way to run a fairly optimized miner in Docker using nvidia-docker:

If you have a single GPU you can use:
Code:
nvidia-docker run -d -e username=example@example.com linuxbench/sth_monero_nvidia_gpu
If you have multiple NVIDIA GPUs you need to target one container per GPU. Here is the example for a dual GPU system:
Code:
NV_GPU=0 nvidia-docker run -d -e username=example@example.com --name GPU0_monero linuxbench/sth_monero_nvidia_gpu
NV_GPU=1 nvidia-docker run -d -e username=example@example.com --name GPU1_monero linuxbench/sth_monero_nvidia_gpu
.... and etc.
Replace example@example.com with your minergate username. We are tagging each GPU using NV_GPU and naming each of the miners so you can see which miner attaches to which GPU.

The advantage of using this method is that you can use this to easily launch Monero GPU mining on NVIDIA GPUs without having to worry about CUDA dependencies.

Note, there are no fees for using this image. If you do want to sign up using our minergate affiliate link (this would be appreciated), here it is:
Smart multicurrency mining pool & 1-click GUI miner

We have tested this image up to 8 GPUs in a system.
 
  • Like
Reactions: gigatexal

Patrick

Administrator
Staff member
Dec 21, 2010
11,938
4,892
113
Not ready to make this primetime yet (need a bit more testing) however:

Minergate version:
Code:
nvidia-docker run -d -e username=example@example.com servethehome/monero_gpu_nv_minergate
Moneropool version:
Code:
nvidia-docker run -d -e username=walletID servethehome/monero_gpu_nv_moneropool
 
Last edited:

Patrick

Administrator
Staff member
Dec 21, 2010
11,938
4,892
113
Updated a xmrpool.net version to include the container name (so you can find it later):

Code:
NV_GPU=0 nvidia-docker run -itd -e username=walletID --name GPU0_monero servethehome/monero_gpu_nv_xmrpooldotnet
Replace walletID with your wallet ID.

So far I have ~18 GPUs running that container which is really helping when it comes to finding the machine/ container mining. xmrpool.net allows you to use an identifier so these use the container ID. I did the same with the CPU version so you can find containers easily.
 

Panamax

New Member
Nov 27, 2016
23
2
3
32
Good day,

i have copy/pasted the above code: "nvidia-docker run -d -e username=example@example.com linuxbench/sth_monero_nvidia_gpu" to my CMD and received the following return massage:

´nvidia-docker´is not recognized as an internal or external command, operable program or batch file

any idea why it won't engage the miner? i am running a GTX770 4Gb
 

Panamax

New Member
Nov 27, 2016
23
2
3
32
Thank you Patrick for your reply,

i Run W10, sudo gives me error in the CMD field. i did not install anything other than docker as of now
 

Panamax

New Member
Nov 27, 2016
23
2
3
32
i further teached myself into the mining and found out that neither W10 nor OSX 10.12 does support the nvidia-docker plugin... what OS would you generally recommend for an as easy as possible miner?
 

Patrick

Administrator
Staff member
Dec 21, 2010
11,938
4,892
113
@Panamax - busy day here. Apologies for the tardy reply.

Ubuntu 16.04.2 LTS is the way to go.
 

Panamax

New Member
Nov 27, 2016
23
2
3
32
Thank you Patrick, going to dive into Ubuntu... can i install the OS on a simple USB3 dongle or do you recommend to have it running from an SSD?
 

Marsh

Moderator
May 12, 2013
2,287
1,100
113
Only need a small size 16gb SSD for Ubuntu OS.

Patrick and I used some cheap M2 16gb SSD about $5 each.
 

Panamax

New Member
Nov 27, 2016
23
2
3
32
i only have 480gb Sandisk SSD´s around thats why im asking if it can run from a USB drive... what would be the problems caused by the USB3 option?
 

Panamax

New Member
Nov 27, 2016
23
2
3
32
Installed Ubuntu, as mentioned and with CPU+GPU (2698V4 ES 2,3ghz + 770 4Gb OC) i hash between 600 and 900 using 300W i let it settle for 12h to calculate the efficiency...

One more question...
Can i run different versions of Nvidia GPU´s in parallel, i have a 980Ti i may could add to the miner, having a 770 and a 980Ti running together???
 
  • Like
Reactions: Patrick

Patrick

Administrator
Staff member
Dec 21, 2010
11,938
4,892
113
Moving the post. Replied in wrong thread :)
 
Last edited:

cl445

New Member
Mar 12, 2017
1
0
1
50
I've got some problems with docker-images in combination with (nvidia-)docker-compose . I can't pass the parameter to the entrypoint. How is the entrypoint specified? Is someone able to fix it? Or is it even possible to get the build-file?