Containers will not start when adding a graphics card

I am using Docker on a Qnap NAS using Container Station 3 . All my Docker containers will not work when adding a Nvidia Graphics card .
Plex, FileFlows, Sonarr, Overseerr, Jellyseerr all have status “created” when i set the graphics card. I remove the graphics card option and they all run . This did work up until a recent Qnap permissions issue. And worked for the first time in several years after installing ubuntu .
This is a common error message
" Failed recreating container: Start container error: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #1: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as ‘legacy’ nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown "
I have uninstalled the nvidia utilities 3x and the driver is the most recent .
Chatgpt gave plenty of suggestions and confirmed the driver is there and working . But did not work to get the containers working . I feel the card is not starting as it moved from its initial install. But have no idea how to get it working again . :crossed_fingers:

I don’t know how QNAP’s Container Station installs Docker, but having a GPU would not break a standard, official Docker CE on Linux. It is very likely that Container Station users on the QNAP forum could give you better help, but you can check the daemon config which would be at /etc/docker/daemon.json normally and remove nvidia runtime related config.

Recent Docker version support the --gpu all option and I think you don’t even need to add the runtime to the config.

How did you confirm it?

Thanks R, firstly I in /etc/docker folder I have 2 folders certs.d and tls (which appear empty) and a key.json file has this only – {“crv”:“P-256”,“d”:“Q9NAQD3Htw3pOrwoofxGEXQZyLwJrY4g9962IGwpsRM”,“kid”:“LOYM:ISPO:M2OT:NXDW:CHFL:LJUM:AWBX:E5OX:RFO5:7JHF:TIZN:4LRO”,“kty”:“EC”,“x”:“dgTO2dUBmIEBkJA7T9YJB6lTNy3n6h2BJc_TKQ7qpYQ”,“y”:“-bup6jR0kgqpsQIjlt5M5_js79SQXpLAe5YS-8CRCwA”} …

Chatgpt gave me dozens of commands and many failed
and your suggestion gets this
[GAS@ZION ~]$ --gpu all
-sh: --gpu: command not found

@rimelek was referring to the cli argument when creating containers:
https://docs.docker.com/reference/cli/docker/container/run/#gpus

Thanks but that is way too many commands for me to run .

This worked but something has moved This is the error when rtryiong to use the graphics card in a container

  • Container Station Docker Engine - Community / 27.1.2-qnap4 Container Station Containers [Container Station] Failed to create container “plex-z”. Error message: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #1: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as ‘legacy’
    nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.

I have found that file . Where do I put it !!

Please be careful with modifications of your OS. From what I know QNAP (and Synology) use an appliance like OS, that doesn’t necessarily comply with what we know from Linux distributions.

Container Station comes bundled with a Docker Engine. But it’s a docker distribution created and maintained by whoever creates this package. There is no guaranty for any docker package other than the ones Docker provides through its own repositories behaves like vanilla docker. You should really try asking in the QNAP forum…

The qnap forum has a lot of arrogant smartarses. I have been there many times over many years and it ain’t changed … They would absolutely say goto the docker forum .
As i have been repeating. this worked !! It is the permisson or location of certain files that is causing the errors.
I think I am the only person online that uses Docker in Container Station 3. I have asked in multiple forums/groups. No one can help :persevere:

The best way would be to work together. We don’t know much about QNAP and how they packaged Docker, what libraries they install or require and they can say they don’t want or can support possible Docker bugs. If we don’t know how something was installed, we can’t suggest solutions. The installation method is actually something we often ask from users. So in this case, I really think the QNAP community would be the best to share more info about the docker package and what could break the installation. The version string also contains “qnap4”, so this is definitely special and not something can be expected to be answered only by the Docker community, unless a Docker community forum user finds your post who also uses QNAP and have enough experience.

When it comes to using Docker run commands or interpreting the output of a docker inspect command or a problem with Docker Hub, I wouldn’t expect the QNAP community to answer it either. At this point, you still want to make Docker work on QNAP, using an engine package made by QNAP.

If you open a topic on the QNAP forum and they send you back to the Docker forum, share the link here and I will be happy to join the conversation there until we clarify whether it is a Docker issue or QNAP issue.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.