Giter VIP home page Giter VIP logo

dlomix-serving's Introduction

dlomix-serving

Accessing a public server

curl

Here is an example http request using only curl sending a POST request to with a json body.

curl -X POST "http://eubic2023.external.msaid.io:8501/v2/models/Prosit_2019_intensity_ensemble/infer" \
 --data-raw '
{
  "id": "LGGNEQVTR_GAGSSEPVTGLDAK",
  "inputs": [
    {"name": "peptides_in_str:0",         "shape": [2,1], "datatype": "BYTES", "data": ["LGGNEQVTR","GAGSSEPVTGLDAK"]},
    {"name": "collision_energy_in:0",     "shape": [2,1], "datatype": "FP32",  "data": [25,25]},
    {"name": "precursor_charge_in_int:0", "shape": [2,1], "datatype": "INT32", "data": [1,2]}
  ]
}
'

Python

See the examples in the corresponding documentation folder

R

TODO

Hosting your own server

Dependencies

dlomix-serving depends on docker and nvidia-container-toolkit.

You can find an ansible script that installs all dependencies here.

How to run it

After installing the dependencies you can pull the docker image and run it with.

docker run \
    --gpus all \
    --shm-size 2G \
    -p 8500:8500 \
    -p 8501:8501 \
    -d \
    ghcr.io/wilhelm-lab/dlomix-serving:latest

Adding your own model

Set up a development server

  1. Install dependencies (Ansible script)
  2. (Suggested) Install docker-compose
  3. Clone the repo
  4. Download existing models with ./getModels.sh
  5. Start the server with docker-compose up

Import model files

This step depends on what framework you used to train your model. For detailed instructions in what format your model needs to be provided you can check out this documentation

You can find examples for TensorFlow, PyTorch and XGBoost in our model repository. The model files themselves need to be downloaded from Zenodo.

Create pre- and post-processing steps

Triton supports models written in pure python. If your model requires pre- and/or post-processing you can implement this as a "standalone" model in python.

There are numerous examples in this repository. One with low complexity you can find here.

Create an ensemble model to connect everything

Ensemble models don't have any code themselves they just manage moving tensors between other models. This is perfect for combining your potentially various pre- and post-processing steps with your main model to create one single model/workflow.

dlomix-serving's People

Contributors

wassimg avatar llautenbacher avatar tkschmidt avatar cpanse avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.