Running Alphafold causes a docker api error, Internal Server Error (“could not select device driver “nvidia” with capabilities: [[gpu]]”)

(base) tsy@tsy-ASUS-V16-V3607VH-V3607VH:~/alphafold$ python3 docker/run_docker.py   --fasta_paths=inputs/Abl1_235_497.fasta   --max_template_date=2022-01-01   --data_dir=$DOWNLOAD_DIR   --output_dir=/home/tsy/alphafold/outputs
I0906 10:47:55.045589 129048779429760 run_docker.py:149] Mounting /home/tsy/alphafold/inputs -> /mnt/fasta_path_0
I0906 10:47:55.060383 129048779429760 run_docker.py:149] Mounting /data/alphafold/uniref90 -> /mnt/uniref90_database_path
I0906 10:47:55.060665 129048779429760 run_docker.py:149] Mounting /data/alphafold/mgnify -> /mnt/mgnify_database_path
I0906 10:47:55.060727 129048779429760 run_docker.py:149] Mounting /data/alphafold -> /mnt/data_dir
I0906 10:47:55.061812 129048779429760 run_docker.py:149] Mounting /data/alphafold/pdb_mmcif -> /mnt/template_mmcif_dir
I0906 10:47:55.061895 129048779429760 run_docker.py:149] Mounting /data/alphafold/pdb_mmcif -> /mnt/obsolete_pdbs_path
I0906 10:47:55.062195 129048779429760 run_docker.py:149] Mounting /data/alphafold/pdb70 -> /mnt/pdb70_database_path
I0906 10:47:55.062635 129048779429760 run_docker.py:149] Mounting /data/alphafold/uniref30 -> /mnt/uniref30_database_path
I0906 10:47:55.063051 129048779429760 run_docker.py:149] Mounting /data/alphafold/bfd -> /mnt/bfd_database_path
Traceback (most recent call last):
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/docker/api/client.py", line 275, in _raise_for_status
    response.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/requests/models.py", line 1167, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.55/containers/fb207d5f3d6d7b3439ccd15952a2fcca36451036d131e79610f464cb1bce6193/start

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tsy/alphafold/docker/run_docker.py", line 318, in <module>
    app.run(main)
    ~~~~~~~^^^^^^
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/absl/app.py", line 312, in run
    _run_main(main, args)
    ~~~~~~~~~^^^^^^^^^^^^
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/absl/app.py", line 258, in _run_main
    sys.exit(main(argv))
             ~~~~^^^^^^
  File "/home/tsy/alphafold/docker/run_docker.py", line 286, in main
    container = client.containers.run(
        image=FLAGS.docker_image_name,
    ...<12 lines>...
        },
    )
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/docker/models/containers.py", line 884, in run
    container.start()
    ~~~~~~~~~~~~~~~^^
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/docker/models/containers.py", line 421, in start
    return self.client.api.start(self.id, **kwargs)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/docker/api/container.py", line 1136, in start
    self._raise_for_status(res)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/docker/api/client.py", line 277, in _raise_for_status
    raise create_api_error_from_http_exception(e) from e
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/home/tsy/miniforge3/lib/python3.14/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation) from e
docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.55/containers/fb207d5f3d6d7b3439ccd15952a2fcca36451036d131e79610f464cb1bce6193/start: Internal Server Error ("could not select device driver "nvidia" with capabilities: [[gpu]]")

This happened when I was trying to run Alphafold and on the last step. This is the only bug that I haven’t been able to figure out.

Installing the Nvidia Container Toolkit and restarting docker doesn’t seem to do anything. The conventional solution seems to be entering:

docker run --rm --gpus all nvidia/cuda:12.0.0-runtime-ubuntu22.04 nvidia-smi

but that also outputs:

docker: Error response from daemon: unknown or invalid runtime name: nvidia

I’ve tried to use the Docker AI for any solutions but it keeps repeatedly throws me into a loop of solutions that I’ve already tried, getting the same results, and being informed of the exact same solution that didn’t work again.

The uploaded Alphafold seems to be slightly out of date and that has been causing multiple problems despite following their instructions.

If they are any new solutions, I will gratefully try them out.