python3 docker/run_docker.py error: requests.exceptions.HTTPError: 400 Client Error
Hi all, After a successful setup and dependencies installation, the running python3 docker/run_docker.py command shows several error lines (see below) heading for requests.exceptions.HTTPError: 400 Client Error. Anyone has dealed this situation? Some reply from maintaniers would be pretty apreciated by everyone. Thanks a lot!
I0805 10:33:03.081809 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold -> /mnt/fasta_path_0 I0805 10:33:03.081928 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold_databases/uniref90 -> /mnt/uniref90_database_path I0805 10:33:03.081984 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold_databases/mgnify -> /mnt/mgnify_database_path I0805 10:33:03.082030 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold_databases/pdb70 -> /mnt/pdb70_database_path I0805 10:33:03.082076 139852172699456 run_docker.py:119] Mounting /home/mario -> /mnt/data_dir I0805 10:33:03.082118 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold_databases/pdb_mmcif -> /mnt/template_mmcif_dir I0805 10:33:03.082163 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold_databases/pdb_mmcif -> /mnt/obsolete_pdbs_path I0805 10:33:03.082205 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold_databases/uniclust30/uniclust30_2018_08 -> /mnt/uniclust30_database_path I0805 10:33:03.082247 139852172699456 run_docker.py:119] Mounting /home/mario/alphafold_databases/bfd -> /mnt/bfd_database_path Traceback (most recent call last): File "/home/mario/.local/lib/python3.8/site-packages/docker/api/client.py", line 268, in _raise_for_status response.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.41/containers/create
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker/run_docker.py", line 201, in
Manually create the /tmp/alphafold folder by yourself and run it again
Dear wttat, Your fix works perfectly! Thanks so much. Please alphafold maintainers, add this issue to the setup and installation documentation.
Hi, I had a similar problem when running python3 docker/run_docker.py
docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.40/containers/create: Bad Request ("Unknown runtime specified nvidia")
I had the same code "HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.41/containers/create" and understand that the fix is to create the tmp/alphafold. As I'm somewhat of a novice, what I don't understand is how and where. Can you please be more specific. Thanks!
I had the same code "HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.41/containers/create" and understand that the fix is to create the tmp/alphafold. As I'm somewhat of a novice, what I don't understand is how and where. Can you please be more specific. Thanks!
Just type the command 'mkdir /tmp/alphafold'
Hi, I had a similar problem when running python3 docker/run_docker.py
docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.40/containers/create: Bad Request ("Unknown runtime specified nvidia")
I had a same problem,have you solved it now?
Hi!
I had the same error but it still appears even though I manually created the /tmp/alphafold. Any ideas on how to solve this?
Hi!
I had the same error but it still appears even though I manually created the /tmp/alphafold. Any ideas on how to solve this?
Hi ldcnop, please check you /etc/docker/daemon.json file and compare it with Nvidia guide For some reason I had "nvidia-container-runtime" in path instead of "/usr/bin/nvidia-container-runtime". It works after changes.
I have the same issue as @Dstspe:
docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.41/containers/create: Bad Request ("Unknown runtime specified nvidia")
/tmp/alphafold was already present.
Changed /etc/docker/daemon.json as @TimurGimadiev suggested but it didn't work out for me.
Installed on Windows Subsystem for Linux 2, I have access on CUDA and docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi works as well as other CUDA functions.
I am using Docker Desktop, which may be also a reason.
@wttat do you have other suggestions?
Edit: Solved this issue by following this thread (translate to english): http://www.suikou.fs.a.u-tokyo.ac.jp/blog/2021/08/12/%E3%83%AD%E3%83%BC%E3%82%AB%E3%83%AB%E7%89%88alphafold%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6docker%E5%91%A8%E3%82%8A%E3%81%AE%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%8C%E5%87%BA%E3%81%9F%E3%82%89/
Basically, I have commented out runtime='nvidia' if FLAGS.use_gpu else None, and inserted:
runtime=None,
device_requests=[docker.types.DeviceRequest(count=-1, capabilities=[['gpu']])
],
in docker/run_docker.py
However, I get a new issue RuntimeError: Resource exhausted: Out of memory while trying to allocate 12582912 bytes.
Is it correlated with the above mentioned edit in run_docker.py?
Hi there, is there anyone know about this?
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/docker/api/client.py", line 268, in _raise_for_status response.raise_for_status() File "/usr/local/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 "/usr/local/lib/python3.6/site-packages/docker/models/containers.py", line 812, in run detach=detach, **kwargs) File "/usr/local/lib/python3.6/site-packages/docker/models/containers.py", line 870, in create resp = self.client.api.create_container(**create_kwargs) File "/usr/local/lib/python3.6/site-packages/docker/api/container.py", line 430, in create_container return self.create_container_from_config(config, name) File "/usr/local/lib/python3.6/site-packages/docker/api/container.py", line 441, in create_container_from_config return self._result(res, True) File "/usr/local/lib/python3.6/site-packages/docker/api/client.py", line 274, in _result self._raise_for_status(response) File "/usr/local/lib/python3.6/site-packages/docker/api/client.py", line 270, in _raise_for_status raise create_api_error_from_http_exception(e) File "/usr/local/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 "/usr/local/lib/python3.6/site-packages/docker/api/client.py", line 268, in _raise_for_status response.raise_for_status() File "/usr/local/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 231, in
Thanks for reporting the issue! We've added a more explicit check in https://github.com/deepmind/alphafold/commit/57a2455e5fab752d8df430ae1d0334e1a21b548c to ensure that a source directory exists before starting the Docker container.
I have the same issue as @Dstspe:
docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.41/containers/create: Bad Request ("Unknown runtime specified nvidia")/tmp/alphafoldwas already present. Changed/etc/docker/daemon.jsonas @TimurGimadiev suggested but it didn't work out for me.Installed on Windows Subsystem for Linux 2, I have access on CUDA and
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smiworks as well as other CUDA functions. I am using Docker Desktop, which may be also a reason.@wttat do you have other suggestions?
Edit: Solved this issue by following this thread (translate to english): http://www.suikou.fs.a.u-tokyo.ac.jp/blog/2021/08/12/%E3%83%AD%E3%83%BC%E3%82%AB%E3%83%AB%E7%89%88alphafold%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6docker%E5%91%A8%E3%82%8A%E3%81%AE%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%8C%E5%87%BA%E3%81%9F%E3%82%89/
Basically, I have commented out
runtime='nvidia' if FLAGS.use_gpu else None,and inserted:runtime=None,device_requests=[docker.types.DeviceRequest(count=-1, capabilities=[['gpu']]) ],in docker/run_docker.pyHowever, I get a new issue
RuntimeError: Resource exhausted: Out of memory while trying to allocate 12582912 bytes.Is it correlated with the above mentioned edit inrun_docker.py?
In wsl2, I used dockerd to set nvidia-runtime, and have the same problem.