cdiener / cobra-docker

Dockerfile to build a single user jupter notebook server running cobrapy and additional tools for flux-based modeling.
https://opencobra.github.io/cobrapy/
MIT License
2 stars 0 forks source link

Run the Cobrapy stack in docker

This repo helps you to build a docker container running cobrapy on Python 3 and a jupyter notebook server apart from those two it also provides the following "add-ons":

Installation

The image is built automatically by the docker automated build system. To get the latest version just pull it in docker. Obviously, this will NOT include commercial solvers.

docker pull cdiener/cobra-docker

Building locally

A local version including commercial solvers and customized models can be built with

mkdir solvers
docker build -t cobra .

Commercial solvers

Cplex

In order to have cplex installed you will need the current cplex install (12.6+) and extract its contents to the "solvers" directory into a subfolder "ibm". You can do that by running the Cplex Installer and when prompted for the installation directory choosing "solvers/ibm" in the directory from where you will build your docker container. The Dockerfile will take care of the rest.

Environment variables

This container supports some of the environment variables of the minimal Jupyter image. The most important ones are:

So you can run a notebook server with HTTPS and password "notebook" at https://localhost:8888 with

docker run -p 8888:8888 -e GEN_CERT=yes cobra start-notebook.sh --NotebookApp.token='notebook'

Planned changes