Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker.errors.ImageNotFound: 404 Client Error when running python3 docker/run_docker.py #107

Closed
rainwala opened this issue Aug 9, 2021 · 9 comments

Comments

@rainwala
Copy link

rainwala commented Aug 9, 2021

Hi all,

when I try the command to try the docker alphafold script
python3 docker/run_docker.py --fasta_paths=/media/HDD1/COVID-19/proteins/ORF3a.fa --max_template_date=2020-05-14 --preset=casp14
I get the following error:

I0809 08:47:13.311604 140088502945600 run_docker.py:119] Mounting /media/HDD1/alphafold -> /mnt/fasta_path_0
I0809 08:47:13.311704 140088502945600 run_docker.py:119] Mounting /media/HDD1/alphafold_db/uniref90 -> /mnt/uniref90_database_path
I0809 08:47:13.311756 140088502945600 run_docker.py:119] Mounting /media/HDD1/alphafold_db/mgnify -> /mnt/mgnify_database_path
I0809 08:47:13.311807 140088502945600 run_docker.py:119] Mounting /media/HDD1/alphafold_db/pdb70 -> /mnt/pdb70_database_path
I0809 08:47:13.311856 140088502945600 run_docker.py:119] Mounting /media/HDD1 -> /mnt/data_dir
I0809 08:47:13.311902 140088502945600 run_docker.py:119] Mounting /media/HDD1/alphafold_db/pdb_mmcif -> /mnt/template_mmcif_dir
I0809 08:51:10.112293 140659661932352 run_docker.py:119] Mounting /media/HDD1/alphafold_db/pdb_mmcif -> /mnt/obsolete_pdbs_path
I0809 08:51:10.112338 140659661932352 run_docker.py:119] Mounting /media/HDD1/alphafold_db/uniclust30/uniclust30_2018_08 -> /mnt/uniclust30_database_path
I0809 08:51:10.112383 140659661932352 run_docker.py:119] Mounting /media/HDD1/alphafold_db/bfd -> /mnt/bfd_database_path
Traceback (most recent call last):
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/client.py", line 268, in _raise_for_status
    response.raise_for_status()
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.41/containers/create

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/models/containers.py", line 812, in run
    detach=detach, **kwargs)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/models/containers.py", line 870, in create
    resp = self.client.api.create_container(**create_kwargs)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/container.py", line 430, in create_container
    return self.create_container_from_config(config, name)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/container.py", line 441, in create_container_from_config
    return self._result(res, True)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/client.py", line 274, in _result
    self._raise_for_status(response)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/client.py", line 270, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.41/containers/create: Not Found ("No such image: alphafold:latest")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/client.py", line 268, in _raise_for_status
    response.raise_for_status()
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.41/images/create?tag=latest&fromImage=alphafold

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker/run_docker.py", line 201, in <module>
    app.run(main)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/absl/app.py", line 312, in run
    _run_main(main, args)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/absl/app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "docker/run_docker.py", line 185, in main
    'XLA_PYTHON_CLIENT_MEM_FRACTION': '4.0',
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/models/containers.py", line 814, in run
    self.client.images.pull(image, platform=platform)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/models/images.py", line 447, in pull
    repository, tag=tag, stream=True, all_tags=all_tags, **kwargs
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/image.py", line 430, in pull
    self._raise_for_status(response)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/api/client.py", line 270, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/media/HDD1/alphafold/lib/python3.6/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.41/images/create?tag=latest&fromImage=alphafold: Not Found ("pull access denied for alphafold, repository does not exist or may require 'docker login': denied: requested access to the resource is denied")

The docker installation seemed to go well, and the output of this:
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

is:
Mon Aug 9 07:53:40 2021

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.19.01    Driver Version: 465.19.01    CUDA Version: 11.3     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:41:00.0 Off |                  N/A |
| 23%   37C    P8    16W / 215W |     17MiB /  7974MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Any help would be appreciated.

@wttat
Copy link

wttat commented Aug 9, 2021

what is the output of
docker images

@rainwala
Copy link
Author

rainwala commented Aug 9, 2021

REPOSITORY             TAG                               IMAGE ID       CREATED         SIZE
giu_aml_docker_image   latest                            ac61a1738a69   3 minutes ago   9.93GB
ubuntu                 16.04                             38b3fa4640d4   13 days ago     135MB
hello-world            latest                            d1165f221234   5 months ago    13.3kB
nvidia/cuda            11.0-cudnn8-runtime-ubuntu18.04   848be2582b0a   10 months ago   3.6GB
nvidia/cuda            11.0-base                         2ec708416bb8   11 months ago   122MB

@rainwala
Copy link
Author

rainwala commented Aug 9, 2021

I ran this command from within the alphafold directory yesterday, and it seemed to complete fine, so I'm not sure why alphafold isn't showing up in docker images:
docker build -f docker/Dockerfile -t alphafold .

@wttat
Copy link

wttat commented Aug 9, 2021

Apparently there are some issues on the alphafold docker image, maybe you should try the docker build command again and paste the output here : )

@rainwala
Copy link
Author

rainwala commented Aug 9, 2021

OK, I'll try that, thank you :)

@rainwala
Copy link
Author

rainwala commented Aug 9, 2021

Now the docker build command no longer works for me. I get the following output:

Sending build context to Docker daemon  12.83MB
Step 1/17 : ARG CUDA=11.0
Step 2/17 : FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu18.04
 ---> 848be2582b0a
Step 3/17 : ARG CUDA
open /media/HDD1/docker_data/overlay2/4f4170c3805735a50c1a8704f25be709eefd480ca10d5b8d64d98a55c0b0ee8c/committed: no such file or directory

@rainwala
Copy link
Author

rainwala commented Aug 9, 2021

I seem to have an issue with this line in docker/Dockerfile:
FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu18.04

So, I changed it to:
FROM nvidia/cuda:${CUDA}-base

because in the recommended test for whether alphafold will be able to access a GPU, the command is:
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

the docker build command is currently running.

@rainwala
Copy link
Author

rainwala commented Aug 9, 2021

OK, I edited the docker/Dockerfile to be this (I added the ARG CUDA_VERSION=11.2.2 line myself), and now docker images shows alphafold:

ARG CUDA=11.0
#FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu18.04
FROM nvidia/cuda:${CUDA}-runtime
# FROM directive resets ARGS, so we specify again (the value is retained if
# previously set).
ARG CUDA
ARG CUDA_VERSION=11.2.2

@rainwala
Copy link
Author

rainwala commented Aug 9, 2021

Now the original command finally works!

python3 docker/run_docker.py --fasta_paths=/media/HDD1/COVID-19/proteins/ORF3a.fa --max_template_date=2020-05-14 --preset=casp14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants