Skip to content
Snippets Groups Projects
Commit e53f1eb7 authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

cleans up and add jhub for binder.

parent cc480379
No related branches found
No related tags found
No related merge requests found
File moved
...@@ -7,6 +7,7 @@ jupyterlab_widgets ...@@ -7,6 +7,7 @@ jupyterlab_widgets
jupyterlab-code-formatter jupyterlab-code-formatter
black black
isort isort
jupyterhub
jupyterlab-git jupyterlab-git
jupyterlab-system-monitor jupyterlab-system-monitor
nbgitpuller nbgitpuller
......
...@@ -13,18 +13,20 @@ USER root ...@@ -13,18 +13,20 @@ USER root
# Copy the list artefacts to install # Copy the list artefacts to install
# Ubuntu and PIP packages, ... # Ubuntu and PIP packages, ...
COPY list_* /tmp/ COPY Artefacts/ /tmp/Artefacts/
# Sets a cache for pip packages # Sets a cache for pip packages
ENV PIP_CACHE_DIR=/var/cache/buildkit/pip ENV PIP_CACHE_DIR=/var/cache/buildkit/pip
RUN mkdir -p $PIP_CACHE_DIR && \
mkdir -p /var/cache/apt
# We need to remove the default `docker-clean` to avoid cache cleaning # We need to remove the default `docker-clean` to avoid cache cleaning
RUN --mount=type=cache,target=/var/cache/apt \ RUN --mount=type=cache,target=/var/cache/apt \
mkdir -p $PIP_CACHE_DIR && \
rm -f /etc/apt/apt.conf.d/docker-clean && \ rm -f /etc/apt/apt.conf.d/docker-clean && \
apt-get update && \ apt-get update && \
apt-get install -qq --yes --no-install-recommends \ apt-get install -qq --yes --no-install-recommends \
$(cat /tmp/list_packages) && \ $(cat /tmp/Artefacts/list_packages) && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Installs only the docker client and docker compose # Installs only the docker client and docker compose
...@@ -77,7 +79,7 @@ RUN --mount=type=cache,target=${PIP_CACHE_DIR} \ ...@@ -77,7 +79,7 @@ RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
--mount=type=cache,target=/opt/conda/pkgs \ --mount=type=cache,target=/opt/conda/pkgs \
echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \ echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
pip install --quiet --upgrade \ pip install --quiet --upgrade \
$(cat /tmp/packages) && \ $(cat /tmp/Artefacts/list_packages) && \
mamba install --quiet --yes \ mamba install --quiet --yes \
nb_conda_kernels \ nb_conda_kernels \
&& \ && \
......
...@@ -10,7 +10,7 @@ A base image for the Jupyter Lab ased on jupyter/minimal-notebook : ...@@ -10,7 +10,7 @@ A base image for the Jupyter Lab ased on jupyter/minimal-notebook :
## Quickstart ## Quickstart
```bash ```bash
docker run --rm --name JupyterDocker-${PWD##*/} \ docker run --rm --name jupyter-base-${PWD##*/} \
--volume data-${PWD##*/}:/home/jovyan/work/${PWD##*/} \ --volume data-${PWD##*/}:/home/jovyan/work/${PWD##*/} \
--publish 8888:8888 \ --publish 8888:8888 \
--env NB_UID=$UID \ --env NB_UID=$UID \
...@@ -20,7 +20,7 @@ docker run --rm --name JupyterDocker-${PWD##*/} \ ...@@ -20,7 +20,7 @@ docker run --rm --name JupyterDocker-${PWD##*/} \
## Host files and UIDs ## Host files and UIDs
```bash ```bash
docker run --rm --name JupyterDocker-${PWD##*/} \ docker run --rm --name jupyter-base-${PWD##*/} \
--user root --user root
--volume $PWD:/home/jovyan/work/${PWD##*/} \ --volume $PWD:/home/jovyan/work/${PWD##*/} \
--volume /var/run/docker.sock:/var/run/docker.sock \ --volume /var/run/docker.sock:/var/run/docker.sock \
...@@ -32,7 +32,7 @@ docker run --rm --name JupyterDocker-${PWD##*/} \ ...@@ -32,7 +32,7 @@ docker run --rm --name JupyterDocker-${PWD##*/} \
## With Docker support ## With Docker support
```bash ```bash
docker run --rm --name JupyterDocker-${PWD##*/} \ docker run --rm --name jupyter-base-${PWD##*/} \
--user root \ --user root \
--privileged=true \ --privileged=true \
--volume $PWD:/home/jovyan/work/${PWD##*/} \ --volume $PWD:/home/jovyan/work/${PWD##*/} \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment