aiidalab / aiidalab-docker-stack

Docker images with the basic software stack for AiiDAlab
https://aiidalab.net
Other
9 stars 14 forks source link

The image is built with tornado==6.1 #147

Closed csadorf closed 3 years ago

csadorf commented 3 years ago

Currently the container is erroneously built with tornado==6.1 albeit only being compatible with tornado<5. This affects all recent images.

To reproduce, for example with the recently tagged release (v20.11.0):

git checkout v20.11.0
docker build . -t aiidalab-docker-stack:v20.11.0 --no-cache  # --no-cache is important!!
docker run --name=aiidalab aiidalab-docker-stack:v20.11.0

Then enter the container with

$ docker exec -it aiidalab /bin/bash
# su aiida
$ pip list --format=freeze | grep tornado
tornado==6.1

This is a critical issue, because it affects all images (even older ones) and renders the image unusable for submissions, e.g., with the QE app.

csadorf commented 3 years ago

@yakutovicha This is the issue we identified yesterday and is probably also related to the issue I mentioned during the team meeting. This is a critical bug and has not been introduced by recent changes, but is likely cause upstream. We need to identify why the wrong tornado version is installed all of a sudden.

csadorf commented 3 years ago

The error was introduced, because we failed to pin the versions of openbabel and rdkit: https://github.com/aiidalab/aiidalab-docker-stack/blob/c243c2c41847a119ae1d5e8f329bede812227ec1/Dockerfile#L101-L105

The latest version of rdkit (2020.09.2) introduced an implicit dependency on tornado>=6.

adegomme commented 3 years ago

I think this issue is back ? I was working on the latest aiidalab docker image (full disclosure, actually it's a on an image based on it, but logs show no suspicious updates when building this one), and noticed errors such as

verdi status
 ✔ config dir:  /home/aiida/.aiida
 ✔ profile:     On profile default
 ✔ repository:  /home/aiida/.aiida/repository/default
 ✔ postgres:    Connected as aiida_qs_aiida_477d3dfc78a204215xxx0cb00ae3618f@localhost:5432
 ✘ rabbitmq:    Unable to connect to rabbitmq with URL: amqp://guest:guest@127.0.0.1:5672?heartbeat=600
Error: AttributeError: module 'tornado.gen' has no attribute '_make_coroutine_wrapper'

and it looks like _make_coroutine_wrapper was indeed removed between v5 and v6 of tornado. Looking at the logs in https://github.com/aiidalab/aiidalab-docker-stack/runs/1765662860 show that indeed tornado 6.1 is installed

Collecting tornado>=5.1 (from jupyterhub==1.3.0)
#6 5.682   Cache entry deserialization failed, entry ignored
#6 5.756   Downloading https://files.pythonhosted.org/packages/01/d1/8750ad20cbcefb499bb8b405e243f83c2c89f78d139e6f8c8d800640f554/tornado-6.1-cp36-cp36m-manylinux1_x86_64.whl (427kB)

and even later it's modified and pulled again by conda (several packages seem to have tornado>=6.1.0 as requirement ). Can you confirm this ? (the logs show that apparently this was reintroduced somewhere mid-december) If this is intended, this may be an issue for topika instead. Best regards

csadorf commented 3 years ago

We'll investigate, but just to make sure, can you rebuild the container with caches turned off? And which exact label are you basing off from?

adegomme commented 3 years ago

it was built by github actions (so no cache) from c170bebfd660aa08d2bb so the latest aiidalab-docker-stack Build log can be seen there : https://github.com/BigDFT-group/ContainerXP/runs/1791713925 but tornado is not involved

yakutovicha commented 3 years ago

I will take care of it today.

yakutovicha commented 3 years ago

Funny enough, the cause of the issue is exactly as before. I downgraded rdkit and added a note to the docker file about it.