Services API¶
This package contains a set of services distributed as a part of BlueGraph.
BlueBrainEmbedder¶
Mini-service for retrieving embedding vectors and similarity computation. A detailed description of the API can be found here. An example can be found in the Embedding service API notebook.
Running the service¶
On its starting the service requires Nexus authentication, in order to fetch available models. Therefore, before launching the service, get your token from Nexus staging and export it to an environment variable as follows:
export NEXUS_TOKEN=<your_token>
Run from the source¶
Simply execute
flask run
Run using Docker¶
First, build the docker image:
docker build . -f service/embedder/Dockerfile
Then, run the container by passing your nexus token env variable using the --env
parameter.
docker run --env NEXUS_TOKEN=$NEXUS_TOKEN -p 5000:5000 <image>