diff --git a/docker-compose/Makefile b/docker-compose/Makefile index 65de8951a33821b2f06c3b530b11b2f3c1fbc355..94bbd94d98e558532b3a2e80b1a7c7f11f0b3d82 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -82,7 +82,7 @@ endif DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) XAUTHORITY=$(XAUTHORITY) TANGO_HOST=$(TANGO_HOST) \ NETWORK_MODE=$(NETWORK_MODE) XAUTHORITY_MOUNT=$(XAUTHORITY_MOUNT) TANGO_SKA_CONTAINER_MOUNT=$(TANGO_SKA_CONTAINER_MOUNT) TANGO_LOFAR_CONTAINER_MOUNT=$(TANGO_LOFAR_CONTAINER_MOUNT) TANGO_LOFAR_CONTAINER_DIR=${TANGO_LOFAR_CONTAINER_DIR} MYSQL_HOST=$(MYSQL_HOST) \ - CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) COMPOSE_IGNORE_ORPHANS=true + CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) COMPOSE_IGNORE_ORPHANS=true LOFAR_UID=$(shell id -u) .PHONY: up down minimal start stop status clean pull help diff --git a/docker-compose/jupyter.yml b/docker-compose/jupyter.yml index f1970916f7e9facc25908c08c63f0938be0c4eb7..d5aed24ccc81771651997cba207a3a22b5a606ee 100644 --- a/docker-compose/jupyter.yml +++ b/docker-compose/jupyter.yml @@ -26,6 +26,7 @@ services: - DISPLAY=${DISPLAY} ports: - "8888:8888" + user: ${LOFAR_UID} working_dir: /jupyter-notebooks entrypoint: - /usr/local/bin/wait-for-it.sh diff --git a/docker-compose/jupyter/Dockerfile b/docker-compose/jupyter/Dockerfile index 336179e73d9320d6f37edf6cdd13231ef291bcec..cb96c2e6d90e967b478d8e133210e2cdfd81b8fb 100644 --- a/docker-compose/jupyter/Dockerfile +++ b/docker-compose/jupyter/Dockerfile @@ -1,15 +1,15 @@ ARG VERSION=latest FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:${VERSION} -RUN pip3 install jupyter -RUN pip3 install ipykernel -RUN pip3 install jupyter_bokeh +RUN sudo pip3 install jupyter +RUN sudo pip3 install ipykernel +RUN sudo pip3 install jupyter_bokeh # Configure jupyter_bokeh RUN sudo mkdir -p /usr/share/jupyter /usr/etc RUN sudo chmod a+rwx /usr/share/jupyter /usr/etc -RUN jupyter nbextension install --sys-prefix --symlink --py jupyter_bokeh -RUN jupyter nbextension enable jupyter_bokeh --py --sys-prefix +RUN sudo jupyter nbextension install --sys-prefix --symlink --py jupyter_bokeh +RUN sudo jupyter nbextension enable jupyter_bokeh --py --sys-prefix # Install profiles for ipython & jupyter COPY ipython-profiles /opt/ipython-profiles/ @@ -18,5 +18,6 @@ COPY jupyter-kernels /usr/local/share/jupyter/kernels/ # Add Tini. Tini operates as a process subreaper for jupyter. This prevents kernel crashes. ENV TINI_VERSION v0.6.0 +ENV JUPYTER_RUNTIME_DIR=/tmp ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini RUN sudo chmod +x /usr/bin/tini