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":
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
A local version including commercial solvers and customized models can be built with
mkdir solvers
docker build -t cobra .
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.
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'