Building/implementing Ketcher 2.0 with server functionality

213 views
Skip to first unread message

Thomas Kopp

unread,
Feb 14, 2020, 4:24:10 PM2/14/20
to indigo-general
I have a web application (mix of webforms and MVC) against a SQL Server database.  I have successfully implemented the Ketcher standalone (ketcher-2.0.0-RC) in it.  I also have successfully installed Bingo to the database and indexed a table of molecules, and added the  Indigo.NET nuget package to the web app.  I am able to search and render structures via C#.

However, I'm unable to determine how to build/implement Ketcher in such a way as to have the SMILES import and other server-dependend functionality.  I followed the directions in the DEVNOTES.md for bui8lding Ketcher to use Indigo Service:

    npm run build -- --api-path=<server-url>

I used:

    npm run build -- --api-path=/v2

To be honest, I wasn't sure what I was supposed to put in the <server-url> value.  The instructions seem to suggest that I need to do a separate build for each web server I want to have Ketcher/Indigo on.  In any case, the resulting build of Ketcher still says it is running in Standalone mode.

Secondly, the installation instructions for Indigo Service at https://lifescience.opensource.epam.com/indigo/service/index.html tell me to install Docker.  I tried, but Docker is telling me I need to upgrade from Windows 10 Home to Windows Pro or Enterprise version 15063.   I'm not going to do that.  And I'm not sure I'm understanding how the service works anyway.  Is it *only* available as a Docker image?  The link above says:

Indigo service can be installed as a Docker image. Please see Downloads() section to find a latest version

  1. 1.) Install Docker
  2. 2.) Download image with indigo service from Downloads
  3. 3.) Add the following configuration for nginx server
  4. But I'm not seeing anything on the downloads page that indicates an image available to download.
  5. Short version, I'm kind of lost.  Sorry I don't have a more specific question other than "How do I get Ketcher out of standalone mode?" and "What do I do then?".  The documentation seems to assume that I know way more than I do.  Any input would be appreciated.
Thanks!

Savelyev Alexander

unread,
Feb 20, 2020, 9:18:57 AM2/20/20
to indigo-general
G'day

Yes, the indigo-service requires docker. Please find images on Download page


Or use public available image from docker registry

epmlsop/indigo_service:latest

Please use the instructions below to run the service.



--api-path=/v2 means that the service should be run on the same server as ketcher. The <server-url> option allows the service run on different location. 

Thanks
Aleksandr

Tom Tailor

unread,
Nov 5, 2020, 7:46:00 AM11/5/20
to indigo-general
Hi i started

the container using

docker run --restart=always -d -p 8002:8002 -e "INDIGO_UWSGI_RUN_PARAMETERS=--plugin python3 --py-autoreload=1" -e "PYTHONPATH=/srv/indigo-python" -e "PYTHONDONTWRITEBYTECODE=1" --name=indigo_service epmlsop/indigo_service:latest /bin/sh -c "supervisord -n"

But the server is  not responding
Where  in the container do i have to store the nginx config ?

Savelyev Alexander

unread,
Nov 5, 2020, 8:18:07 AM11/5/20
to indigo-general
Hi
  • indigo-service runs only uwsgi on 8002 port

  • One needs to run nginx service and add uwsgi configuration
    see instructions here
    https://lifescience.opensource.epam.com/indigo/service/index.html

  • nginx should be run separately. The reason for the environment with separate web server is that ketcher static files and indigo-service should be hosted on the same server and port. Otherwise REST API will not work because of CORS

  • One can run nginx or any other http server which supports uwsgi (e.g. Tomcat)

  • Also please see #1 for some options to run nginx


Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages