Skip to content
Snippets Groups Projects
Commit cbeaacef authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Merge branch 'master' into...

Merge branch 'master' into 2021-04-02T17.33.12-branched_from_master-Adjustments_for_attribute_wrapper
parents c48194b0 f215048e
No related branches found
No related tags found
1 merge request!12Adjustments and fixes for attribute_wrapper merge
...@@ -26,6 +26,7 @@ services: ...@@ -26,6 +26,7 @@ services:
- DISPLAY=${DISPLAY} - DISPLAY=${DISPLAY}
ports: ports:
- "8888:8888" - "8888:8888"
user: ${CONTAINER_EXECUTION_UID}
working_dir: /jupyter-notebooks working_dir: /jupyter-notebooks
entrypoint: entrypoint:
- /usr/local/bin/wait-for-it.sh - /usr/local/bin/wait-for-it.sh
...@@ -33,5 +34,5 @@ services: ...@@ -33,5 +34,5 @@ services:
- --timeout=30 - --timeout=30
- --strict - --strict
- -- - --
- /usr/bin/tini -- jupyter notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --NotebookApp.password= - /usr/bin/tini -- /usr/local/bin/jupyter-notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --NotebookApp.password=
restart: on-failure restart: on-failure
ARG VERSION=latest ARG VERSION=latest
FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:${VERSION} FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:${VERSION}
RUN pip3 install jupyter RUN sudo pip3 install jupyter
RUN pip3 install ipykernel RUN sudo pip3 install ipykernel
RUN pip3 install jupyter_bokeh RUN sudo pip3 install jupyter_bokeh
# Configure jupyter_bokeh # Configure jupyter_bokeh
RUN sudo mkdir -p /usr/share/jupyter /usr/etc RUN sudo mkdir -p /usr/share/jupyter /usr/etc
RUN sudo chmod a+rwx /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 sudo jupyter nbextension install --sys-prefix --symlink --py jupyter_bokeh
RUN jupyter nbextension enable jupyter_bokeh --py --sys-prefix RUN sudo jupyter nbextension enable jupyter_bokeh --py --sys-prefix
# Install profiles for ipython & jupyter # Install profiles for ipython & jupyter
COPY ipython-profiles /opt/ipython-profiles/ COPY ipython-profiles /opt/ipython-profiles/
RUN sudo chown tango.tango -R /opt/ipython-profiles RUN sudo chown tango.tango -R /opt/ipython-profiles
COPY jupyter-kernels /usr/local/share/jupyter/kernels/ COPY jupyter-kernels /usr/local/share/jupyter/kernels/
# Install patched jupyter executable
RUN sudo pip3 install python-logstash-async
COPY jupyter-notebook /usr/local/bin/jupyter-notebook
# Add Tini. Tini operates as a process subreaper for jupyter. This prevents kernel crashes. # Add Tini. Tini operates as a process subreaper for jupyter. This prevents kernel crashes.
ENV TINI_VERSION v0.6.0 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 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN sudo chmod +x /usr/bin/tini RUN sudo chmod +x /usr/bin/tini
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# An adjustment of the `jupyter-notebook' executable patched to:
# - log to the ELK stack
#
# We go straight for the notebook executable here, as the "jupyter" command
# execvp's into the requested notebook subcommand, erasing all configuration
# we set here.
import re
import sys
from notebook.notebookapp import main
from logstash_async.handler import AsynchronousLogstashHandler, LogstashFormatter
import logging
if __name__ == '__main__':
# log to the tcp_input of logstash in our ELK stack
handler = AsynchronousLogstashHandler("elk", 5959, database_path='/tmp/pending_log_messages.db')
# add to logger of Jupyter traitlets Application. As that logger is configured not to propagate
# messages upward, we need to configure it directly.
logger = logging.getLogger("NotebookApp")
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:latest FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:latest
COPY lofar-requirements.txt /lofar-requirements.txt COPY lofar-requirements.txt /lofar-requirements.txt
RUN pip3 install -r /lofar-requirements.txt RUN sudo pip3 install -r /lofar-requirements.txt
ENV TANGO_LOG_PATH=/var/log/tango
RUN sudo mkdir -p /var/log/tango && sudo chmod a+rwx /var/log/tango
opcua >= 0.98.9 opcua >= 0.98.9
astropy astropy
python-logstash-async
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment