Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Le 24/06/2016 à 02:14, Stéphane Téletchéa a écrit : > http://www.steletch.org/spip.php?article91 > > Many thanks, > > Stéphane > > Just for the record, there was on omission in the web site when you want to use a bigger project than just a demo, the WSGI process must contain the directive: WSGIApplicationGroup %{GLOBAL} The long reason is here (basically a problem of python initialisation ordering): https://code.google.com/archive/p/modwsgi/wikis/ApplicationIssues.wiki#Python_Simplified_GIL_State_API HTH, Stéphane -- Assistant Professor in BioInformatics, UFIP, UMR 6286 CNRS, Team Protein Design In Silico UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France Tél : +33 251 125 636 / Fax : +33 251 125 632 http://www.ufip.univ-nantes.fr/ - http://www.steletch.org -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Le 22/06/2016 à 02:56, Stéphane Téletchéa a écrit : > Since I have tried to reproduce all the > steps properly I'll set up soon a post > on my blog about this, so others will be able to reproduce easily the > initial steps without being blocked like > me for some days ... Once the post is up, I'll post it here. Dear all, I tool little time to assemble my tests on a dedicated page, with no github link for now, but most (if not all) code is indicated in the blog post. Thanks again for the comments and remarks, I hope this entry will be useful to someone else than me :-) http://www.steletch.org/spip.php?article91 Many thanks, Stéphane -- Lecturer, UFIP, UMR 6286 CNRS, Team Protein Design In Silico UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France Tél : +33 251 125 636 / Fax : +33 251 125 632 http://www.ufip.univ-nantes.fr/ - http://www.steletch.org -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Dear Michał, I already went there and I'm really happy ChEMBL is using the same technologies as I do :-) (or the other way around :-) For sure I will consider the Beaker facility for inclusion in my project, but for now I'm too "old-school" minded, I want everything at home before querying the world (so for now I'm querying ChEMBL once to grab already known ligands for a given protein target, that's it). I'm sure my "student-to-come" will be more open minded and look more closely to this approach. Thanks for the links and the tremendous work done @EBI... Best, Stéphane Le 21/06/2016 à 21:24, Michał Nowotka a écrit : > Hi Stéphane, > > Just to let you know about two things: > > 1. ChEMBL web services are a Django application written using RDKit. > We deploy it using gunicorn and Apache through Reverse Proxy and put > on a Virtual Machine named myChEMBL that you can download. Here are > some example configuration files: > https://github.com/chembl/mychembl/tree/master/webservices/conf but > I'm happy to explain more if you want. > > 2. There is a project called Beaker that exposes most of RDKit methods > as RESTful API. The source code is here: > https://github.com/chembl/chembl_beaker and a live instance here: > https://www.ebi.ac.uk/chembl/api/utils/docs -- Lecturer, UFIP, UMR 6286 CNRS, Team Protein Design In Silico UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France Tél : +33 251 125 636 / Fax : +33 251 125 632 http://www.ufip.univ-nantes.fr/ - http://www.steletch.org -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Dear Paolon Le 21/06/2016 à 20:09, Paolo Tosco a écrit : > 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 > Yes, I did that already (see below) ... > and adding two SetEnv directives in the section of my > Apache rdkit.conf: > > $ cat /etc/httpd/conf.d/rdkit.conf > Alias /rdkit /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 > [...] > > > Hope this helps, > Paolo Well, this is also what I did (not using the RDBASE env variable, though), but it was not sufficient, so since I was not able to find out where my error was, I did the search the other way around: check again on my system to find where the error was ... I have unapplied migrations on the DB so this is the cause of my error, it seems. In the meantime since I'm curious and stubborn I have also started from scratch a new django project, and there everything is fine ... Since I have tried to reproduce all the steps properly I'll set up soon a post on my blog about this, so others will be able to reproduce easily the initial steps without being blocked like me for some days ... Once the post is up, I'll post it here. Thanks all a lot for your time and contributions, Stéphane -- Lecturer, UFIP, UMR 6286 CNRS, Team Protein Design In Silico UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France Tél : +33 251 125 636 / Fax : +33 251 125 632 http://www.ufip.univ-nantes.fr/ - http://www.steletch.org -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Hi Stephane, Add some Python code to your uwsgi.py file that prints out the environment that the Python interpreter sees (maybe comment out everything else) when it is called by the Apache. It is very likely that the Apache calls another Python interpreter than you expect. What Paolo writes is probably the solution to your problem. Markus - | Markus Sitzmann | markus.sitzm...@gmail.com > On 21.06.2016, at 21:24, Michał Nowotka wrote: > > Hi Stéphane, > > Just to let you know about two things: > > 1. ChEMBL web services are a Django application written using RDKit. > We deploy it using gunicorn and Apache through Reverse Proxy and put > on a Virtual Machine named myChEMBL that you can download. Here are > some example configuration files: > https://github.com/chembl/mychembl/tree/master/webservices/conf but > I'm happy to explain more if you want. > > 2. There is a project called Beaker that exposes most of RDKit methods > as RESTful API. The source code is here: > https://github.com/chembl/chembl_beaker and a live instance here: > https://www.ebi.ac.uk/chembl/api/utils/docs > > Kind regards, > > Michał Nowotka > > On Tue, Jun 21, 2016 at 7:46 PM, Téletchéa Stéphane > wrote: >> Le 21/06/2016 20:18, TJ O'Donnell a écrit : >>> I would suggest setting PYTHONPATH in >>> config or ini files for >>> Apache or Django or uwsgi >>> Not sure which is required. >> >> Dear all, >> >> This is already indicated using a WSGIprocessGroup : >> >> WSGIDaemonProcess manageLibrary >> python-path=/path/to/project/projets/manageLibrary:/path/to/project/projets/manageLibrary/tools/django1.8/lib/python2.7/site-packages:/path/to/project/projets/manageLibrary/tools/rdkit/lib:/path/to/project/projets/manageLibrary/tools/rdkit/lib/python2.7/site-packages >> display-name=manageLibrary >> WSGIProcessGroup manageLibrary >> WSGIScriptAlias /tools/manageLibrary >> '/path/to/project/projets/manageLibrary/manageLibrary/wsgi.py' >> >> >> See more in detail here: >> https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04 >> >> I have also checked permisisons and files with no luck (and no output in >> logs ...). >> >> I may start from scratch with a simple django project to find if is >> already works there ... >> >> Many Thanks, if you have any direction I'll be happy to test, >> >> Stéphane >> >> -- >> Assistant Professor in BioInformatics, UFIP, UMR 6286 CNRS, Team Protein >> Design In Silico >> UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes >> cedex 03, France >> Tél : +33 251 125 636 / Fax : +33 251 125 632 >> http://www.ufip.univ-nantes.fr/ - http://www.steletch.org >> >> >> -- >> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >> present their vision of the future. This family event has something for >> everyone, including kids. Get more information and register today. >> http://sdm.link/attshape >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > -- > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Hi Stéphane, Just to let you know about two things: 1. ChEMBL web services are a Django application written using RDKit. We deploy it using gunicorn and Apache through Reverse Proxy and put on a Virtual Machine named myChEMBL that you can download. Here are some example configuration files: https://github.com/chembl/mychembl/tree/master/webservices/conf but I'm happy to explain more if you want. 2. There is a project called Beaker that exposes most of RDKit methods as RESTful API. The source code is here: https://github.com/chembl/chembl_beaker and a live instance here: https://www.ebi.ac.uk/chembl/api/utils/docs Kind regards, Michał Nowotka On Tue, Jun 21, 2016 at 7:46 PM, Téletchéa Stéphane wrote: > Le 21/06/2016 20:18, TJ O'Donnell a écrit : >> I would suggest setting PYTHONPATH in >> config or ini files for >> Apache or Django or uwsgi >> Not sure which is required. > > Dear all, > > This is already indicated using a WSGIprocessGroup : > > WSGIDaemonProcess manageLibrary > python-path=/path/to/project/projets/manageLibrary:/path/to/project/projets/manageLibrary/tools/django1.8/lib/python2.7/site-packages:/path/to/project/projets/manageLibrary/tools/rdkit/lib:/path/to/project/projets/manageLibrary/tools/rdkit/lib/python2.7/site-packages > display-name=manageLibrary > WSGIProcessGroup manageLibrary > WSGIScriptAlias /tools/manageLibrary > '/path/to/project/projets/manageLibrary/manageLibrary/wsgi.py' > > > See more in detail here: > https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04 > > I have also checked permisisons and files with no luck (and no output in > logs ...). > > I may start from scratch with a simple django project to find if is > already works there ... > > Many Thanks, if you have any direction I'll be happy to test, > > Stéphane > > -- > Assistant Professor in BioInformatics, UFIP, UMR 6286 CNRS, Team Protein > Design In Silico > UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes > cedex 03, France > Tél : +33 251 125 636 / Fax : +33 251 125 632 > http://www.ufip.univ-nantes.fr/ - http://www.steletch.org > > > -- > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
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 section of my Apache rdkit.conf: $ cat /etc/httpd/conf.d/rdkit.conf Alias /rdkit /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 [...] 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 > -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Le 21/06/2016 20:18, TJ O'Donnell a écrit : > I would suggest setting PYTHONPATH in > config or ini files for > Apache or Django or uwsgi > Not sure which is required. Dear all, This is already indicated using a WSGIprocessGroup : WSGIDaemonProcess manageLibrary python-path=/path/to/project/projets/manageLibrary:/path/to/project/projets/manageLibrary/tools/django1.8/lib/python2.7/site-packages:/path/to/project/projets/manageLibrary/tools/rdkit/lib:/path/to/project/projets/manageLibrary/tools/rdkit/lib/python2.7/site-packages display-name=manageLibrary WSGIProcessGroup manageLibrary WSGIScriptAlias /tools/manageLibrary '/path/to/project/projets/manageLibrary/manageLibrary/wsgi.py' See more in detail here: https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04 I have also checked permisisons and files with no luck (and no output in logs ...). I may start from scratch with a simple django project to find if is already works there ... Many Thanks, if you have any direction I'll be happy to test, Stéphane -- Assistant Professor in BioInformatics, UFIP, UMR 6286 CNRS, Team Protein Design In Silico UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France Tél : +33 251 125 636 / Fax : +33 251 125 632 http://www.ufip.univ-nantes.fr/ - http://www.steletch.org -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
I would suggest setting PYTHONPATH in config or ini files for Apache or Django or uwsgi Not sure which is required. On Tue, Jun 21, 2016 at 11:15 AM, Téletchéa Stéphane < stephane.teletc...@univ-nantes.fr> wrote: > Le 21/06/2016 20:05, Bennion, Brian a écrit : > > What is the actual problem that is occurring? You have listed what you > have tried to do to fix a problem. > > > > Brian > > Dear Brian, > > I get a 500 error meaning something is not working properly, but no > trace in logs (either apache or django), > so I can only "assume" it comes from there since in the "developper" > mode there is no problem (everything works as expected). > > Sorry for the confusion, > > Stéphane > > -- > Assistant Professor in BioInformatics, UFIP, UMR 6286 CNRS, Team Protein > Design In Silico > UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 > Nantes cedex 03, France > Tél : +33 251 125 636 / Fax : +33 251 125 632 > http://www.ufip.univ-nantes.fr/ - http://www.steletch.org > > > > -- > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Struggling with apache + rdkit + django
Le 21/06/2016 20:05, Bennion, Brian a écrit : > What is the actual problem that is occurring? You have listed what you have > tried to do to fix a problem. > > Brian Dear Brian, I get a 500 error meaning something is not working properly, but no trace in logs (either apache or django), so I can only "assume" it comes from there since in the "developper" mode there is no problem (everything works as expected). Sorry for the confusion, Stéphane -- Assistant Professor in BioInformatics, UFIP, UMR 6286 CNRS, Team Protein Design In Silico UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France Tél : +33 251 125 636 / Fax : +33 251 125 632 http://www.ufip.univ-nantes.fr/ - http://www.steletch.org -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Struggling with apache + rdkit + django
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 -- Assistant Professor in BioInformatics, UFIP, UMR 6286 CNRS, Team Protein Design In Silico UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France Tél : +33 251 125 636 / Fax : +33 251 125 632 http://www.ufip.univ-nantes.fr/ - http://www.steletch.org -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss