Monero GPU mining in Docker with nvidia-docker

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

reedog117

New Member
May 24, 2017
2
0
1
42
In the spirit of Docker you'd run a proxy in another container.
That's not a problem - I just wish I could see the actual Dockerfile and how the images are put together as they aren't really showing up in the Docker Hub.
 

JazzFaucet

New Member
May 19, 2017
29
4
3
... and with CPU+GPU...
Is it usual practice to run a Docker container (for CPU mining) and an NVIDIA-Docker container (for GPU mining) on the same physical machine? Is this a case where the two miners together result in a greater total hash rate than running the CPU or GPU miner separately - even though the hash rate from each is slightly less than if it was run alone?
 

MiniKnight

Well-Known Member
Mar 30, 2012
3,072
973
113
NYC
Is it usual practice to run a Docker container (for CPU mining) and an NVIDIA-Docker container (for GPU mining) on the same physical machine? Is this a case where the two miners together result in a greater total hash rate than running the CPU or GPU miner separately - even though the hash rate from each is slightly less than if it was run alone?
The most common way to mine is with Windows. If you're using Linux, Docker works. There's usually a different Linux miner for GPU and CPU so you're running multiple miners Docker provides some isolation and ease of mgmt. Nvidia-docker is just docker with the CUDA libraries injected.
 

PHOOK

New Member
Jul 16, 2017
3
1
3
46
Hello

I have a GPU ASUS GTX1060, and I mine ETC for a couple of weeks without problem.
I would like to use your image (servethehome/monero_gpu_nv_minergate) to mine MONERO, launching the container like that:

NV_GPU=0 ; sudo nvidia-docker run -d -e username=xxxxxx@yyyyy.com --name GPU0_monero servethehome/monero_gpu_nv_minergate ; sudo docker logs GPU0_monero -f

####In the logs, after this compilation line
gcc -std=gnu99 -g -O2 -pthread -L/usr/local/cuda/lib64 -o ccminer ccminer-cpu-miner.o ccminer-util.o ccminer-sha2.o cryptonight/cryptonight.o cryptonight/cuda_cryptonight_core.o cryptonight/cuda_cryptonight_extra.o ccminer-cryptonight.o crypto/ccminer-oaes_lib.o crypto/ccminer-c_keccak.o crypto/ccminer-c_groestl.o crypto/ccminer-c_blake256.o crypto/ccminer-c_jh.o crypto/ccminer-c_skein.o crypto/ccminer-aesb.o -L/usr/lib/x86_64-linux-gnu -lcurl -ljansson -lpthread -lcudart -static-libstdc++ -fopenmp -lcrypto -lssl -lcrypto -lssl
#### the make exists...
make[2]: Leaving directory `/ccminer-cryptonight-0.17'
make[1]: Leaving directory `/ccminer-cryptonight-0.17'
#### and I get this error
[2017-07-16 19:08:20] Unable to query number of CUDA devices! Is an nVidia driver installed?

Any idea of what can be wrong ?

Thank you....

P.

For information, following is ok :
$ sudo nvidia-docker run --rm nvidia/cuda nvidia-smi

Sun Jul 16 19:24:07 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.35 Driver Version: 367.35 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 0000:01:00.0 Off | N/A |
| 0% 40C P8 7W / 120W | 0MiB / 6072MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|

| No running processes found |
+-----------------------------------------------------------------------------+
 

PHOOK

New Member
Jul 16, 2017
3
1
3
46
  • Like
Reactions: Patrick

Klee

Well-Known Member
Jun 2, 2016
1,289
396
83
Ok since I am unable to get XMR-Nvidia working in Ubuntu 17.04 i'm giving this a go.

It took some Googling to get nvidia-docker to install and now its "
latest: Pulling from servethehome/monero_gpu_nv_xmrpooldotnet" and downloading about a gig's worth of files......

To be continued.
 

Klee

Well-Known Member
Jun 2, 2016
1,289
396
83
And it errored out....

"Status: Downloaded newer image for servethehome/monero_gpu_nv_xmrpooldotnet:latest
docker: Error response from daemon: create nvidia_driver_375.66: VolumeDriver.Create: internal error, check logs for details."

I AM runnning nvidia driver 375.66 and I can't seem to find the docker log and i'm tired and i'm going to bed after I reboot into windows 10 and and mine some monero with this pc.

Will mess with it tomorrow night.
 

nthu9280

Well-Known Member
Feb 3, 2016
1,628
498
83
San Antonio, TX
@Klee
Let me see what version of the driver I have. I know it's 38?.??. Docker & Nvidia-docker work fine. Running ETH docker and seem to work fine. Ranges upto 22MH/s with default clocks. I did put power limit of 50% (78w) on my Asus 1060 6G strix OC card.

Don't have lot of exp with Linux and made the rookie mistake of letting ubuntu default volume sizes. Need to adjust that with proper sizes.

I also have issues with with GUI login. Can putty or toggle to alt+F1 and login.

Sent from my Nexus 6 using Tapatalk
 

Klee

Well-Known Member
Jun 2, 2016
1,289
396
83
Well it seems if I install driver version 384.69 via a ppa, I would rather do that than Nvidia's .run file since I have had bad luck with that in the past, it wants to uninstall Cuda 8. So it looks like I will have to reinstall Cuda 8 after installing 384.69 and force it not to downgrade back to 375.66.

Maybe this weekend......
 

Piers DD

New Member
Aug 29, 2017
7
0
1
49
Any idea why my container is quitting with the following error;

[2017-09-26 12:09:20] 1 miner threads started, using 'cryptonight' algorithm.
[2017-09-26 12:09:20] GPU #0: GeForce GTX 1080 Ti (28 SMX), using 40 blocks of 8 threads
[2017-09-26 12:09:20] Starting Stratum on stratum+tcp://xmr.pool.minergate.com:45560
[2017-09-26 12:09:20] GPU #0: Warning: block count 40 is not a multiple of SMX count 28.
[2017-09-26 12:09:20] GPU #0: FATAL: failed to allocate device memory for long state
*** ccminer-cryptonight for nVidia GPUs by tsiv ***

TIA,
Piers
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,511
5,792
113
Hey @Piers DD I do not think it is an issue with the GTX 1080 Ti. I have had this running on the 8x 1080 Ti and 10x 1080 Ti systems.

Perhaps it is a permissions issue?
 

timrohde

New Member
Nov 7, 2017
1
0
1
57
I get the same error about "long state" on my 1050 ti. Is it possible that the miner attempts to use 100% of the GPU and bumps up against the OS using some portion of it? If so, is there a way to start the container with some limits set on GPU usage?

Thanks!
 

benm

New Member
Nov 7, 2017
4
1
3
36
I'd like to GPU mine on the supportxmr.com pool, but based on what I'm seeing, the GPU mining containers listed on the Docker STH profile are all customized for specific pools, none of which are supportxmr.

Is there an image like the generic xmrig CPU miner, but for GPU mining? If not, can one of the existing images be adapted for use with other pools?

Thanks.
 

Ronni

New Member
Oct 1, 2013
11
2
3
Hi @Piers DD

did you resolve the issues with 'GPU #0: FATAL: failed to allocate device memory for long state'? I get this in windows and in Ubuntu (with the docker image) and any help would be appreciated

the output I am seeing in docker
[2017-12-10 11:47:11] Using JSON-RPC 2.0
[2017-12-10 11:47:11] 1 miner threads started, using 'cryptonight' algorithm.
[2017-12-10 11:47:11] Starting Stratum on stratum+tcp://mine.moneropool.com:3333
[2017-12-10 11:47:11] GPU #0: GeForce GTX 1060 6GB (10 SMX), using 40 blocks of 8 threads
[2017-12-10 11:47:11] GPU #0: FATAL: failed to allocate device memory for long state

thanks
 
  • Like
Reactions: impact79

impact79

New Member
Dec 12, 2017
1
0
1
44
Hi, i have the same problem with my GTX 750 on Ubuntu 16.04:


[2017-12-12 16:06:41] 1 miner threads started, using 'cryptonight' algorithm.
[2017-12-12 16:06:41] GPU #0: GeForce GTX 750 (4 SMX), using 40 blocks of 8 threads
[2017-12-12 16:06:41] Pool set diff to 1063
[2017-12-12 16:06:41] Stratum detected new block
[2017-12-12 16:06:41] GPU #0: FATAL: failed to allocate device memory for long state

Any news on this ?
Would it be helpful to post the whole log ?
 

Piers DD

New Member
Aug 29, 2017
7
0
1
49
No, I presumed that very few are pushing their 1080Ti in this way.
Am looking at 1060 and other options now