Dockerfile

First create locally a file requirements.txt with:

pystan

Add there also other requirements you need.

Then create Dockerfile with

FROM jupyter/datascience-notebook

COPY requirements.txt .
RUN pip install -r requirements.txt

WORKDIR /workdir

ENV JUPYTER_ENABLE_LAB=yes

Build docker

docker build -t barteks/bayes-notebook .

Running with linking to local directory

If you locally create locally a directory workdir and put there notebooks, then you can run the docker with the command:

docker run -it --rm -p 8888:8888 -p 8787:8787 --mount type=bind,source="$(pwd)"/workdir,target=/workdir barteks/bayes-notebook

https://jupyter-docker-stacks.readthedocs.io/en/latest/using/recipes.html#using-pip-install-or-conda-install-in-a-child-docker-image

Updated: 2021-03-28