fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

NVIDIA Insufficient driver in docker #914

Open driminicus opened 6 years ago

driminicus commented 6 years ago

After compiling using the dockerfile using docker build -t xmr-stak . the container seems to build properly (no errors while compiling).

After starting the docker container and running through the config only the CPU miner starts, the GPU miner doesn't. After I manually ran the miner inside the docker container the reason it gave was in the title: NVIDIA Insufficient driver!

In the normal built container nvcc --version gives a command not found error (because the dockerfile unintalls all the cuda stuff) but after removing the apt-get purge part it gives the following:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176

Note that there are no nvidia drivers installed in the container so nvidia-smi also gives a 'command not found'

This is done on kde neon (ubuntu 16.04) with a GTX 970 and an intel i5 4690k.

JerichoJones commented 6 years ago

Is this still an issue for you?

driminicus commented 6 years ago

Yes, this still isn't fixed.

fractalyse commented 6 years ago

Install nvidia-docker

Add the package repositories

curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID)` curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list sudo apt-get update

Install nvidia-docker2 and reload the Docker daemon configuration

sudo apt-get install -y nvidia-docker2 sudo pkill -SIGHUP dockerd

Run container with :

docker run --runtime=nvidia xmr-stak