Created
May 21, 2017 19:39
-
-
Save gdahlm/dc4c08da8e97e10057c3136c93bdaf69 to your computer and use it in GitHub Desktop.
Dockerfile for launching a Jupyter notebook container.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /code | |
WORKDIR /code | |
ADD requirements.txt /code/ | |
RUN pip install -r requirements.txt | |
ADD . /code/ | |
# Add Tini. Tini operates as a process subreaper for jupyter. This prevents | |
# kernel crashes. | |
ENV TINI_VERSION v0.6.0 | |
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini | |
RUN chmod +x /usr/bin/tini | |
ENTRYPOINT ["/usr/bin/tini", "--"] | |
# Uncomment the following if not using with docker-compose | |
#EXPOSE 8888 | |
#CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment