Skip to content
Snippets Groups Projects
Select Git revision
  • a9e44401be5693edf505ca4ecc06b0345a828a56
  • master default protected
  • L2SS-2407-swap-iers-caltable-monitoring-port
  • L2SS-2357-fix-ruff
  • sync-up-with-meta-pypcc
  • stabilise-landing-page
  • all-stations-lofar2
  • v0.39.7-backports
  • Move-sdptr-to-v1.5.0
  • fix-build-ubuntu
  • tokens-in-env-files
  • fix-build
  • L2SS-2214-deploy-cdb
  • fix-missing-init
  • add-power-hardware-apply
  • L2SS-2129-Add-Subrack-Routine
  • Also-listen-internal-to-rpc
  • fix-build-dind
  • L2SS-2153--Improve-Error-Handling
  • L2SS-2153-Add-Grpc-Gateway-support
  • L2SS-1970-apsct-lol
  • v0.55.5 protected
  • v0.55.4 protected
  • 0.55.2.dev0
  • 0.55.1.dev0
  • 0.55.0.dev0
  • v0.54.0 protected
  • 0.53.2.dev0
  • 0.53.1.dev0
  • v0.52.3-r2 protected
  • remove-snmp-client
  • v0.52.3 protected
  • v0.52.3dev0 protected
  • 0.53.1dev0
  • v0.52.2-rc3 protected
  • v0.52.2-rc2 protected
  • v0.52.2-rc1 protected
  • v0.52.1.1 protected
  • v0.52.1 protected
  • v0.52.1-rc1 protected
  • v0.51.9-6 protected
41 results

Dockerfile

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Dockerfile 2.33 KiB
    ARG SOURCE_IMAGE
    FROM ${SOURCE_IMAGE}
    
    # UID if the user that this container will run under. This is needed to give directories
    # that are needed for temporary storage the proper owner and access rights.
    ARG CONTAINER_EXECUTION_UID=1000
    
    # Create homedir
    ENV HOME=/home/user
    RUN sudo mkdir -p ${HOME}
    RUN sudo chown ${CONTAINER_EXECUTION_UID} -R ${HOME}
    
    COPY requirements.txt ./
    RUN sudo pip3 install -r requirements.txt
    
    # see https://github.com/jupyter/nbconvert/issues/1434
    RUN sudo bash -c "echo DEFAULT_ARGS += [\\\"--no-sandbox\\\"] >> /usr/local/lib/python3.7/dist-packages/pyppeteer/launcher.py"
    RUN sudo apt-get update -y
    RUN sudo apt-get install -y git gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libcairo-gobject2 libxinerama1 libgtk2.0-0 libpangoft2-1.0-0 libthai0 libpixman-1-0 libxcb-render0 libharfbuzz0b libdatrie1 libgraphite2-3 libgbm1
    
    # Allow Download as -> PDF via LaTeX
    RUN sudo apt-get install -y texlive-xetex texlive-fonts-recommended texlive-latex-recommended
    
    # Configure jupyter_bokeh
    RUN sudo mkdir -p /usr/share/jupyter /usr/etc
    RUN sudo chmod a+rwx /usr/share/jupyter /usr/etc
    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/
    RUN sudo chown ${CONTAINER_EXECUTION_UID} -R /opt/ipython-profiles
    COPY jupyter-kernels /usr/local/share/jupyter/kernels/
    
    # Install patched jupyter executable
    COPY jupyter-notebook /usr/local/bin/jupyter-notebook
    
    # 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
    
    USER ${CONTAINER_EXECUTION_UID}
    # pyppeteer-install installs in the homedir, so run it as the user that will execute the notebook
    RUN pyppeteer-install