portainer: Error when enabling GPU

Bug description I have an existing container for Jellyfin that I want to recreate with GPU enabled. Instead I get an error saying:

Failure e.HostConfig.DeviceRequests is null

Expected behavior Enabling the GPU slider and recreating works

Portainer Logs Nothing helpful seems to show up in logs

Steps to reproduce the issue:

  1. Hit edit on existing container
  2. Enable GPU in Runtime & Resources
  3. Hit deploy the container
  4. See error

Technical details:

  • Portainer version: 2.15.1
  • Docker version (managed by Portainer): 20.10.8
  • Kubernetes version (managed by Portainer): n/a
  • Platform: Ubuntu 22.04.1
  • Command used to start Portainer: docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
  • Browser: Firefox
  • Use Case (delete as appropriate): Using Portainer at Home
  • Have you reviewed our technical documentation and knowledge base? Yes

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 84 (4 by maintainers)

Most upvoted comments

Any update on this issue?

If anyone can help me redeploy my image so I can get my 1060 working in my plex docker container, I would be massively indebted to you!

@gausie

Thank you for the information. I was able to reproduce the issue. I am going to log an internal request to review and resolve.

Thanks!

gpu-testing

I finally got it to work for me with a gtx 1060 in ubuntu following these steps

  1. sudo apt search nvidia (to find latest driver)
  2. sudo apt install nvidia-driver-xxx
  3. sudo apt install -y nvidia-container-toolkit
  4. sudo systemctl restart docker
  5. get UUID from /prod/drivers/nvidia/000-0x (number for gpu you want to use)
  6. nano information
  7. add to portainer

Getting “Cannot read properties of null (reading ‘push’)” on trying to enable intel integrated graphics. Edge agent on docker standalone.

Same behavior on 2.18.1.

I am also getting 500 when trying to update a plex container.

Mac mini M1 GPU id or UUID

Does the one suggested here work? https://osxdaily.com/2022/02/02/find-mac-system-info-terminal-system-profiler/

Not sure if that’ll work or not, but there seems to be just the one UUID for those since they have an integrated GPU?

For now, I have worked around this by including the GPU in my stack compose script. Needs to be using the nvidia runtime:

    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]      


@gausie

Thank you for the information. I was able to reproduce the issue. I am going to log an internal request to review and resolve.

Thanks!

gpu-testing gpu-testing

I’m still getting the exact same error that is highlighted in this post

I see https://github.com/portainer/portainer/pull/8316 still isn’t merged, is this related?