2

I have a Notebook (Xiaomi Mi Notebook Pro) with a Nvidia MX150. So it's utilizing the Nvidia's Optimus technology. As a distribution, I use Fedora 28.

Bumblebee

Therefore I installed Bumblebee to take advantage of this technology.

It should be installed correctly since I can start glmark2 via optirun or primusrun. Also running cat /proc/acpi/bbswitch outputs ON. So the Nvidia GPU should indeed be running.

Docker

To install docker, I followed the instructions on https://docs.docker.com/install/linux/docker-ce/fedora/#install-docker-ce

Running docker run hello-world outputs what it should, so docker does also work.

nvidia-docker2

I got nvidia-docker2 installed on Fedora with this commands:

curl -s -L https://nvidia.github.io/nvidia-docker/centos7/nvidia-docker.repo | \
  sudo tee /etc/yum.repos.d/nvidia-docker.repo
sudo dnf install nvidia-docker2
sudo pkill -SIGHUP dockerd

Installed nvidia packages

To check which nvidia packages are installed, I run this command:

rpm -qa '*nvidia*'

  • Output:akmod-nvidia-396.51-1.fc28.x86_64
  • nvidia-container-runtime-2.0.0-1.docker18.06.1.x86_64
  • nvidia-driver-396.51-1.fc28.x86_64
  • kmod-nvidia-4.17.9-200.fc28.x86_64-396.45-1.fc28.x86_64
  • kmod-nvidia-4.17.14-202.fc28.x86_64-396.51-1.fc28.x86_64
  • nvidia-docker2-2.0.3-1.docker18.06.1.ce.noarch
  • nvidia-driver-libs-396.51-1.fc28.x86_64
  • nvidia-container-runtime-hook-1.4.0-1.x86_64
  • libnvidia-container1-1.0.0-0.1.rc.2.x86_64
  • kmod-nvidia-4.17.12-200.fc28.x86_64-396.45-1.fc28.x86_64
  • libnvidia-container-tools-1.0.0-0.1.rc.2.x86_64

Test docker is running with Nvidia GPU

Unfortunately, docker doesn't currently run with the Nvidia GPU:

optirun docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi

I get this error:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"process_linux.go:385: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig --device=all --compute --utility --require=cuda>=9.0 --pid=26115 /var/lib/docker/overlay2/c00aa7855e42deee545cb07531a571538e0d051d38f45e36584a1c850dd47680/merged]\\\\nnvidia-container-cli: initialization error: driver error: failed to process request\\\\n\\\"\"": unknown.

What am I missing?

For now, I am clueless where's the error. I guess it could be a problem with the CUDA version.

0

The only "fix" I've found (more of a work-around) is to ensure the nvidia card is is first loaded / selected via prime-select:

sudo prime-select nvidia

Feels like it's defeating the purpose of using bumblebee

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.