Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Paolo T. <pao...@un...> - 2016-06-21 18:39:29
|
Dear Stéphane, I can run Python scripts import RDKit modules on CentOS 7 by putting the following rdkit.conf file in /etc/ld.so.conf.d: $ cat /etc/ld.so.conf.d/rdkit.conf /var/www/cgi-bin/rdkit/rdkit-Release_2016_03_1/lib and adding two SetEnv directives in the <Directory> section of my Apache rdkit.conf: $ cat /etc/httpd/conf.d/rdkit.conf Alias /rdkit /var/www/cgi-bin/rdkit <Directory /var/www/cgi-bin/rdkit> SetEnv RDBASE /var/www/cgi-bin/rdkit/rdkit-Release_2016_03_1 SetEnv PYTHONPATH /var/www/cgi-bin/rdkit/rdkit-Release_2016_03_1 [...] </Directory> Hope this helps, Paolo On 06/21/16 18:05, Téletchéa Stéphane wrote: > Dear all, > > I am willing to incorporate some rdkit functionalities using a django > backend for an internal project > (basically ligand annotation and comparison with docking studies) which > will be published once ready. > > Using the "developper" mode of django and conda I can properly get all > of them working properly, > but I'm struggling in translating this into a real web service. > > For what it counts, I am admin on the machine and for now not a lot of > services are up so I can test things... > > So far I have tried: > - installing rdkit with conda + all required dependencies + wsgi file > pointing to it > - installing django + dependencies using pip + install from scratch of > rkdit (Ubuntu Linux 14.04 LTS, 64bits): > a) using a custom location, works with django manage.py runserver > but not when launched from apache > b) building rdkit using different locations (adding > /etc/ld.so.conf.d/rdkit.conf + ldconfig -> libraries are correctly detected) > c) adding various path in the wsgi.py configuration file > d) and many more ... > > There are other django services working fine on the machine so it does > not come from there. > I have also tried to run only this service with no better luck. > > I think it is the combination of externally adding LD_LIBRARY_PATH + > PYTHONPATH that is the culprit, > since the web server responds to the requested address, but after "a > certain amout of time", I see in apache2 logs: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > End of script output before headers: wsgi.py > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Unfortunately there is no other error message, so I am unable to trace > the rest of the error. > > Does it rings a bell to someone? > > Thanks a lot in advance, > > Stéphane Téletchéa > |