alphafold icon indicating copy to clipboard operation
alphafold copied to clipboard

Apparent incompatibility with (PyPI) docker 5.0.0 and requests 2.31.0 (solved)

Open alexholehouse opened this issue 2 years ago • 4 comments

On installing/setting up the full alphafold version this week, I finally got things downloaded, but running predictions was met with

alphafold docker.errors.DockerException: Error while fetching server API version: request() got an unexpected keyword argument 'chunked'

I'm surprised this has not been reported by others, and maybe it's some Python version thing, but it seems to reflect an update to the requests package in the last few months (although perhaps urllib3 is also to blame here?).

Rolling requests back to requests==2.28.1 seemed to fix this error. However, in doing this, predictions were incredibly slow (I gave up after about three hours on one protein). After about 2 days of trying various things, I believe the only difference between my alphafold repo and the GitHub version is that I updated the docker/requirements.txt and requirements.txt to use docker==6.1.3. instead of docker==5.0.0 (I'm running Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.3).

I'm not sure why the Python docker API was pinned to 5.0.0, and there may have been a good reason. However, unpinning to the current default gives me decent performance (MSA construction takes 20-30 min depending on protein size, and then once precomputed per-model prediction is typically 1-2 min all in, running on an A4500 (where I can run five predictions in parallel). This is all using the full database.

Sharing this in case it's helpful for anyone else. Not bold enough to propose a pull request but if someone wanted to test this it may be a good thing to consider going forward if indeed this reflects an incompatibility between some combo of requests=>2.31.0, Docker version 20.10.2 and the python docker==5.0.0.0.

alexholehouse avatar Aug 05 '23 22:08 alexholehouse

Thank you for posting this, as I have had the same issue.

(See also #779 which mentions the same initial issue)

kiramt avatar Oct 18 '23 08:10 kiramt

@kiramt are you also having performance issues?

@alexholehouse trying out your fix now but with docker version 5. Will try version 6+ if it doesn't move like you said. (I'm on a 3080 running for the first time)

dltacube avatar Dec 04 '23 09:12 dltacube

@dltacube yes also had performance issues. Have not looked at it in a while but was planning to check docker version etc.

kiramt avatar Dec 04 '23 09:12 kiramt

Crashed after about 5 hours of analyzing an 800 residue protein so either something is misconfigured on my end or my 10gb GPU isn't cutting it.

/edit I don't want to mix up too many issues but I was able to get ok performance with v5 of docker but had to upgrade the container itself to 11.8.0 and use devel rather than base.

dltacube avatar Dec 04 '23 18:12 dltacube