From ded4c9582aa1be429abb99da52b3b405a1cfaa6d Mon Sep 17 00:00:00 2001 From: 7data <7data@7data.com> Date: Fri, 8 Oct 2021 12:53:22 +0000 Subject: [PATCH 1/3] update rstudio config --- docker_atom/work/script-setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker_atom/work/script-setup.sh b/docker_atom/work/script-setup.sh index b2551073..b29a5a7d 100644 --- a/docker_atom/work/script-setup.sh +++ b/docker_atom/work/script-setup.sh @@ -98,6 +98,13 @@ setup_R_rstudio() { && echo "auth-none=1" >> /etc/rstudio/rserver.conf \ && echo "auth-minimum-user-id=0" >> /etc/rstudio/rserver.conf \ && echo "auth-validate-users=0" >> /etc/rstudio/rserver.conf \ + && echo "www-allow-origin=*" >> /etc/rstudio/rserver.conf \ + && echo "www-same-site=none" >> /etc/rstudio/rserver.conf \ + && echo "www-frame-origin=same" >> /etc/rstudio/rserver.conf \ + && echo "www-verify-user-agent=0">> /etc/rstudio/rserver.conf \ + && echo "database-config-file=/etc/rstudio/db.conf" >> /etc/rstudio/rserver.conf \ + && echo "provider=sqlite" >> /etc/rstudio/db.conf \ + && echo "directory=/etc/rstudio/" >> /etc/rstudio/db.conf \ && printf "USER=root rserver --www-port=8888" > /usr/local/bin/start-rstudio.sh \ && chmod u+x /usr/local/bin/start-rstudio.sh From 681838e4cf909fae2fbc53a7002031d8aa33c214 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Mon, 11 Oct 2021 12:18:46 +0800 Subject: [PATCH 2/3] bugfix: yarn --- docker_atom/work/script-setup.sh | 5 +++-- docker_dev/Dockerfile | 3 +++ docker_dev/work/script-extend.sh | 6 +----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker_atom/work/script-setup.sh b/docker_atom/work/script-setup.sh index b29a5a7d..4d103a36 100644 --- a/docker_atom/work/script-setup.sh +++ b/docker_atom/work/script-setup.sh @@ -67,9 +67,10 @@ setup_node() { && mv /opt/node* /opt/node \ && echo "PATH=/opt/node/bin:$PATH" >> /etc/bash.bashrc \ && export PATH=/opt/node/bin:$PATH \ - && npm install -g npm \ + && npm install -g npm yarn \ && ln -s /opt/node/bin/* /usr/bin/ \ - && echo "@ Version of Node, npm, and yarn:" `node -v` `npm -v` + && echo "@ Version of Node, npm, and yarn:" `node -v` `npm -v` \ + && echo "@ Version of Yarn:" `yarn -v` } diff --git a/docker_dev/Dockerfile b/docker_dev/Dockerfile index d6f227dc..b4ade294 100644 --- a/docker_dev/Dockerfile +++ b/docker_dev/Dockerfile @@ -18,6 +18,9 @@ COPY work /opt/utils/ # Setup Jupyter: Basic Configurations and Extensions... RUN source /opt/utils/script-extend.sh \ + && mkdir -pv /opt/conda/etc/jupyter/ \ + && mv /opt/utils/jupyter_notebook_config.json /opt/conda/etc/jupyter/ \ + && mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \ && for profile in $(echo $ARG_PROFILE_JUPYTER | tr "," "\n") ; do ( setup_jupyter_${profile} || true ) ; done # If not keeping NodeJS, remove NoedJS to reduce image size diff --git a/docker_dev/work/script-extend.sh b/docker_dev/work/script-extend.sh index aedb1e51..9a9c6235 100644 --- a/docker_dev/work/script-extend.sh +++ b/docker_dev/work/script-extend.sh @@ -2,13 +2,9 @@ source /opt/utils/script-utils.sh setup_jupyter_base() { # TEMP fix: nbconvert requires mistune>=0.8.1,<2 for now - pip install -Uq jupyterhub jupyterlab notebook ipywidgets qpod_hub "mistune>=0.8.1,<2" \ - && mkdir -p /opt/conda/etc/jupyter/ \ - && mv /opt/utils/jupyter_notebook_config.json /opt/conda/etc/jupyter/ \ + pip install -Uq jupyterhub jupyterlab notebook ipywidgets qpod_hub "mistune>=0.8.1,<2" \ && jupyter nbextension enable --py widgetsnbextension \ - && echo "@ Version of Yarn:" `yarn -v` \ && jupyter labextension install @jupyter-widgets/jupyterlab-manager \ - && mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \ && echo "@ Version of Jupyter Notebook/JupyterLab:" \ `jupyter notebook --version` `jupyter lab --version` } From 1e43b524cc31b8b57b5551b78bfa2b4bda25ece4 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Mon, 11 Oct 2021 13:43:17 +0800 Subject: [PATCH 3/3] typo --- docker_dev/Dockerfile | 4 ++-- docker_dev/work/script-extend.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker_dev/Dockerfile b/docker_dev/Dockerfile index b4ade294..676533d3 100644 --- a/docker_dev/Dockerfile +++ b/docker_dev/Dockerfile @@ -17,10 +17,10 @@ ARG ARG_KEEP_NODEJS=true COPY work /opt/utils/ # Setup Jupyter: Basic Configurations and Extensions... -RUN source /opt/utils/script-extend.sh \ - && mkdir -pv /opt/conda/etc/jupyter/ \ +RUN mkdir -pv /opt/conda/etc/jupyter/ \ && mv /opt/utils/jupyter_notebook_config.json /opt/conda/etc/jupyter/ \ && mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \ + && source /opt/utils/script-extend.sh \ && for profile in $(echo $ARG_PROFILE_JUPYTER | tr "," "\n") ; do ( setup_jupyter_${profile} || true ) ; done # If not keeping NodeJS, remove NoedJS to reduce image size diff --git a/docker_dev/work/script-extend.sh b/docker_dev/work/script-extend.sh index 9a9c6235..413707f6 100644 --- a/docker_dev/work/script-extend.sh +++ b/docker_dev/work/script-extend.sh @@ -2,8 +2,8 @@ source /opt/utils/script-utils.sh setup_jupyter_base() { # TEMP fix: nbconvert requires mistune>=0.8.1,<2 for now - pip install -Uq jupyterhub jupyterlab notebook ipywidgets qpod_hub "mistune>=0.8.1,<2" \ - && jupyter nbextension enable --py widgetsnbextension \ + pip install -Uq jupyterhub jupyterlab notebook ipywidgets qpod_hub "mistune>=0.8.1,<2" \ + && jupyter nbextension enable --py widgetsnbextension \ && jupyter labextension install @jupyter-widgets/jupyterlab-manager \ && echo "@ Version of Jupyter Notebook/JupyterLab:" \ `jupyter notebook --version` `jupyter lab --version`