Custom Base Images

ScienceOps uses Docker as a runtime environment for each model. Every model has their own docker image and then corresponding set of containers. By building an image for each model, ScienceOps gives your data science team the flexibility to deploy models using virtually any Python or R package.

ScienceOps Base Images

ScienceOps ships with "base images" for R and Python (yhat/scienceops-r:x.x.x and yhat/scienceops-python:x.x.x respectively). Base images contain a set of packages, files, drivers, etc. that are commonly used by our customers. By using a base image instead of a plain, vanilla image such as ubuntu:14.04, ScienceOps saves you the trouble of having to install scientific R/Python packages for each model deployment (this can be quite time consuming).

Customizing Your Base Image

You can fork and edit the ScienceOps base image to include additional components. Start by downloading the latests ScienceOps base Python/R image (i.e. docker pull yhat/scienceops-python:0.0.3 or docker pull yhat/scienceops-r:0.0.2). This will take some time as the images are fairly large. Each comes with a substantial amount of Python/R packages pre-installed. Once you've pulled the image you can make changes to your image using a Dockerfile or by running a container and then committing your changes manually. Note that using a Dockerfile is the suggested method as it's much easier to reproduce your work if the need arises. Once you've updated your image, push it to DockerHub and set the "Base Image" for your ScienceOps instance in the admin application (see the /admin/servers route under the "Base Images" tab.)

Backups

If you do start customizing your ScienceOps base images, it's recommended that you periodically make offsite backups of them. Doing this is quick, easy, and a very good idea. To backup an image called yhat/forked-base-image:0.0.1, do the following:

docker save yhat/forked-base-image:0.0.1 > yhat/forked-base-image-0.0.1.tar
gzip yhat/forked-base-image-0.0.1.tar # recommended but not required
scp yhat/forked-base-image-0.0.1.tar.gz ...offsite location goes here...

If you ever need to restore the image, this is also easy:

scp ...offsite location goes here... ./
docker load yhat/forked-base-image-0.0.1.tar.gz

results matching ""

    No results matching ""