Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Run in docker

Fei Gao edited this page Aug 5, 2016 · 5 revisions

We provide Dockerfile for docker users.

In this document, we use Dockerfile and the application LogisticRegression as the example. You can find how to use LogisticRegression in wiki.

Install docker

Install docker according to docs of docker. After you install docker, you can use the command 'docker' or 'docker --help' to look over the commands of docker.

Get docker image

This document present two ways to get docker image.

Build docker image from Dockerfile

docker build -t repo[:tag] - <dockerfile>

repo is the name of docker image. You also can add tag name to it. is the path of Dockerfile which you want to build. You can use this command to build docker image from local Dockerfile.

Example: docker build -t multiverso/deploy/docker:ubuntu - Dockerfile

Get docker image from public hub

We have built images in the public repository. So, you can pull the docker image by the below command.

docker pull lyysdy/dmtk:multiverso-v2

Run in a single machine

docker run -t -i repo[:tag] <program> <args>

is the path of program which we want to run. is the arguments of . repo[:tag] is the name of docker image(dmtk:v2 or lyysdy/dmtk:multiverso-v2).

Example:

docker run -t -i lyysdy/dmtk:multiverso-v2 /dmtk/build/applications/LogisticRegression config_file_path

If we want to use files which are not in docker, we can use the option '-v' to map local path to the path inside docker.

docker run -t -i -v /local/path:/path/inside/docker repo[:tag] <program> <args>

Run in multi-machine

Docker is ran as a process. So we can use mpi to run the docker process which runs LogisticRegression. We can use the option '-p' to map local port to port inside docker.

mpirun -m $machine_file docker run -t -i -p /local/port:/port/inside/docker repo[:tag] <program> <args>