From f9c93b9403c9dca814157b5e66cdda1d1b2998c7 Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Sat, 29 Dec 2018 18:10:49 -0500 Subject: [PATCH] [ci skip] Add a demo notebook and tag info --- binder/Dockerfile | 7 ++- binder/README.ipynb | 133 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 binder/README.ipynb diff --git a/binder/Dockerfile b/binder/Dockerfile index 17a3e8ad..73767546 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1 +1,6 @@ -FROM jupyter/base-notebook:17aba6048f44 \ No newline at end of file +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. +ARG TAG=17aba6048f44 +FROM jupyter/base-notebook:$TAG +ENV TAG=$TAG +COPY README.ipynb . diff --git a/binder/README.ipynb b/binder/README.ipynb new file mode 100644 index 00000000..deafa122 --- /dev/null +++ b/binder/README.ipynb @@ -0,0 +1,133 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# jupyter/base-notebook on Binder\n", + "\n", + "Run the cells below to inspect what's in the [jupyter/base-notebook](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-base-notebook) image from the Jupyter Docker Stacks project. \n", + "\n", + "Click here to open a [JupyterLab](../lab) tab. Click here to open a [Classic Notebook](../notebooks) tab." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "print(f'This container is using tag {os.environ[\"TAG\"]} of the jupyter/base-notebook image')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The notebook server is running as the following user." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!id" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here's the contents of that user's home directory, the default notebook directory for the server." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!ls -al" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Conda is available in the user's path." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!which conda" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The user has read/write access to the root conda environment." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!ls -l /opt/conda" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following packages are conda-installed in the base image to support [Jupyter Notebook](https://github.com/jupyter/notebook), [JupyterLab](https://github.com/jupyterlab/jupyterlab), and their use in [JupyterHub](https://github.com/jupyterhub/jupyterhub) environments (e.g., [MyBinder](http://mybinder.org/))." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!conda list" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Other images in the [jupyter/docker-stacks project](https://github.com/jupyter/docker-stacks) include additional libraries. See the [Jupyter Docker Stacks documentation](https://jupyter-docker-stacks.readthedocs.io/en/latest/) for full details." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}