Skip to content

Commit

Permalink
Feat/jupyter vadc (#67)
Browse files Browse the repository at this point in the history
* feat: separate jupyter-vadc Docker image

* feat: installing pymssql
  • Loading branch information
m0nhawk authored Mar 8, 2022
1 parent fbd5ce4 commit 693f754
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
21 changes: 21 additions & 0 deletions jupyter-vadc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM quay.io/cdis/datascience-notebook:notebook-6.4.8
USER root

RUN apt-get update && \
apt-get install -y --no-install-recommends \
freetds-bin \
&& rm -rf /var/lib/apt/lists/*

USER ${NB_UID}

# install extra packages
RUN mamba install --quiet --yes \
'pymssql' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

WORKDIR /home/${NB_USER}

COPY --chown=jovyan:users resources/custom.js /home/${NB_USER}/.jupyter/custom/
COPY --chown=jovyan:users resources/jupyter_notebook_config.py /home/${NB_USER}/.jupyter/
4 changes: 4 additions & 0 deletions jupyter-vadc/resources/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// do not open notebooks in a new tab: https://github.com/jupyter/notebook/issues/4115
define(['base/js/namespace'], function(Jupyter){
Jupyter._target = '_self';
})
8 changes: 8 additions & 0 deletions jupyter-vadc/resources/jupyter_notebook_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import os

c.NotebookApp.tornado_settings = {
"headers": {
"Content-Security-Policy": "frame-ancestors self %s"
% os.getenv("FRAME_ANCESTORS", "")
}
}

0 comments on commit 693f754

Please sign in to comment.