brainsteam.co.uk/brainsteam/content/posts/2015-11-01-sapienta-web-ser...

31 lines
1.8 KiB
Markdown
Raw Normal View History

2020-12-28 11:39:11 +00:00
---
title: SAPIENTA Web Service and CLI
author: James
type: post
date: 2015-11-01T19:50:52+00:00
url: /2015/11/01/sapienta-web-service-and-cli/
categories:
- PhD
tags:
- docker
- partridge
- sapienta
- script
- web
- websockets
---
Hoorah! After a number of weeks I&#8217;ve finally managed to get SAPIENTA running inside docker containers on our EBI cloud instance. You can try it out at <http://sapienta.papro.org.uk/>.
The project was previously running via a number of very precarious scripts that had a habit of stopping and not coming back up. Hopefully the new docker environment should be a lot more stable.
Another improvement I&#8217;ve made is to create a websocket interface for calling the service and a Python-based commandline client. If you&#8217;re interested I&#8217;m using [socket.io][1] and the relevent python libraries ([server][2] and [client][3]). This means that anyone who needs to can now request annotations in large batches. I&#8217;m planning on using socket.io to interface Partridge with SAPIENTA since they are hosted on separate servers and this approach avoids any complicated firewall issues.
This is also very good news for some of the data scientists who have wanted to use SAPIENTA but haven&#8217;t wanted (or been able) to take on the 2-3 hour installation process that the full blown server and pipeline require (and that&#8217;s on a good day). The websocket CLI is a very simple python script with a low number of dependencies so it should be up and running in 5 minutes or your money back.
To get your hands on this tool &#8211; see [this bitbucket][4].
[1]: http://socket.io/
[2]: https://github.com/miguelgrinberg/Flask-SocketIO/
[3]: https://pypi.python.org/pypi/socketIO-client
[4]: https://bitbucket.org/partridge/sapienta_wsclient