https://github.com/kirillseva/rain
Dockerize you tundra container
https://github.com/kirillseva/rain
Last synced: 4 months ago
JSON representation
Dockerize you tundra container
- Host: GitHub
- URL: https://github.com/kirillseva/rain
- Owner: kirillseva
- Created: 2015-03-25T21:49:07.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-10T15:56:23.000Z (almost 9 years ago)
- Last Synced: 2024-08-13T07:13:26.744Z (8 months ago)
- Language: R
- Homepage:
- Size: 35.2 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - kirillseva/rain - Dockerize you tundra container (R)
README
rain [](https://travis-ci.org/kirillseva/rain)  [](http://kirillseva.github.io/rain/)
===========
Convert a tundraContainer into a dockerized REST server.
Available routes:
-----
HTTP request | endpoint | response
-------------|------------------------------|---------
GET/POST | / | "OK"
GET/POST | /ping | "pong"
GET/POST | /predict (with JSON payload) | serialized output of predict as JSONYou can customize both your server script and your dockerfile if you need additional functionality.
Usage
----
```r
model <- readRDS("path/to/model/object")
build_image(model, "kirillseva/mySuperGlmModel") # use docker hub, default options
build_image(model, "kirillseva/veryCustomized", "myregistry.com",
"path/to/dockerfile", "path/to/server/script") # custom registry and configs
```By default, the server will listen on port 8103. You can run it as following:
`docker run -p 8103:8103 kirillseva/mySuperGlmModel`