glasgowcompbio / ms2ldaviz

Substructural discovery in untargeted metabolomics data using LDA topic modelling.
http://ms2lda.org
MIT License
11 stars 8 forks source link

Running the website via docker-compose fails #184

Open FlepTumbleweed opened 2 years ago

FlepTumbleweed commented 2 years ago

Hello there,

before starting to talk about issues, i wanted to thank you all for your amazing work with MS2LDA. Sadly I'm not allowed to upload one of my datasets to external servers, so I tried to run the MS2LDA website locally via docker as described in the readme and encounteres some problems. I tried to bypass them, and while I failed at that, my hope is you might gain some insight by the results of my failed attempts.

Cache/ Web within docker-compose

Running the version from November 2nd (679001cf63c650355fcea4b654dd048b11aa291c) I got an error: ERROR: Service 'web' depends on service 'cache' which is undefined.

I tried to find the reason, and indeed within "docker-compose.yml" the service web is defined to depend on cache, while cache is not defined in the same file. It was deleted within commit "Switching from memcached to django file-based caching, as it is simpler" (e73bc76c5b7834e723d23f0654702e1f084a525b).

So as caching was resolved in another way since then, I decided to try another (admittedly naive) approach and simply deleted - chache from the dependances of service web within docker-compose.yml. I guess there are better ways of resolving this, but sadly I'm neither especially adept at python, nor do I know your code very well.

Requirements.txt and Python version

(This might be connected to #173 , as you seem to switch from requirements.txt to pipfile.)

Deleting - cache allowed me to start docker-compose up -d without generating an error right away. Instead I got an error silightly later during [5/7] RUN pip install -r requirements.txt: .

`#9 5.666 ERROR: Could not find a version that satisfies the requirement Django==3.0.6 (from -r requirements.txt (line 8)) (from versions: 1.1.3, 1.1.4, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 1.4.14, 1.4.15, 1.4.16, 1.4.17, 1.4.18, 1.4.19, 1.4.20, 1.4.21, 1.4.22, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11, 1.5.12, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.6.10, 1.6.11, 1.7, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.7.10, 1.7.11, 1.8a1, 1.8b1, 1.8b2, 1.8rc1, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, 1.8.12, 1.8.13, 1.8.14, 1.8.15, 1.8.16, 1.8.17, 1.8.18, 1.8.19, 1.9a1, 1.9b1, 1.9rc1, 1.9rc2, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9, 1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.10a1, 1.10b1, 1.10rc1, 1.10, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5, 1.10.6, 1.10.7, 1.10.8, 1.11a1, 1.11b1, 1.11rc1, 1.11, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.11.5, 1.11.6, 1.11.7, 1.11.8, 1.11.9, 1.11.10, 1.11.11, 1.11.12, 1.11.13, 1.11.14, 1.11.15, 1.11.16, 1.11.17, 1.11.18, 1.11.20, 1.11.21, 1.11.22, 1.11.23, 1.11.24, 1.11.25, 1.11.26, 1.11.27, 1.11.28, 1.11.29)

9 5.689 ERROR: No matching distribution found for Django==3.0.6 (from -r requirements.txt (line 8))`

The reason for this seems to be, that docker tried to setup Python version 2.7, however, some of the packages in requirements.txt need later Python-versions (and as I read on your website and in the pipfile you switched to Python 3.8, I assume the dockerfile was simply not updated since then). So I tried to update some things by myself (again naively): The line FROM python:2 in the dockerfile was changed to FROM python:3.8 and I also changed requirements.txt so that used packages and package versions were identical to the Pipfile.

Docker-compose finished building, the site is not reachable though

With the changes, docker-compose indeed seemed to successfully build everything, Docker shows redis_1, db_1, worker_1, web_1 and proxy_1 all running. when trying to reach localhost:8001 however, it shows the following Error:

An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

So I guess that might be on me, as I changed quite a bit without really knowing what I was doing, however, maybe you can deduce something from it.

Old versions/ Forks

I also tried to run some of the older commits/ Forks, as I guessed the docker setup worked at some point (sorry if the bugs actually come from my system, i use a Win 10 64 bit with Docker Desktop, Docker commands were executed via Windows Powershell), and indeed one of the Forks I tried (gkreder / ms2ldaviz) worked (well - mostly. Visualisation didn't really do anything, but loading data, calculating and downloading results worked).

Again, thanks for all your work. i hope you find my results helpful.

Best wishes, Flep