From 25f494b3a89ff80c86e22fb62268d1e687009f44 Mon Sep 17 00:00:00 2001 From: hotwa Date: Sun, 26 May 2024 23:52:38 +0800 Subject: [PATCH] change nodejs to 18 and all install nglview --- Dockerfile.jupyterhub | 33 ++++++++++++---------- jupyterhub_config.py | 13 +++++++++ spawnerdockerfile/Dockerfile.base-notebook | 21 ++++++++++---- 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/Dockerfile.jupyterhub b/Dockerfile.jupyterhub index 0cfd894..52baaaf 100755 --- a/Dockerfile.jupyterhub +++ b/Dockerfile.jupyterhub @@ -8,6 +8,8 @@ ARG ROOT_PASSWD="password" ARG HOME="/home/${CREATE_USER}" ARG DEBIAN_FRONTEND="noninteractive" ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND} +ARG NODEJS_VERSION='18' +ENV NODEJS_VERSION=${NODEJS_VERSION} USER root RUN < /etc/timezone dpkg-reconfigure -f noninteractive tzdata +sudo apt-get remove --purge libnode72:amd64 -y +curl -fsSL https://deb.nodesource.com/setup_${NODEJS_VERSION}.x | sudo -E bash - # 安装所需的软件包 apt-get install -y python3 python3-pip gcc g++ build-essential nodejs npm gdebi-core curl wget openssh-server vim lrzsz net-tools sudo git # 创建新用户 @@ -30,8 +34,20 @@ EOT RUN < /etc/timezone dpkg-reconfigure -f noninteractive tzdata # 安装所需的软件包 +sudo apt-get remove --purge libnode72:amd64 -y +curl -fsSL https://deb.nodesource.com/setup_${NODEJS_VERSION}.x | sudo -E bash - apt-get install -y python3 python3-pip gcc g++ build-essential nodejs npm gdebi-core curl wget openssh-server vim lrzsz net-tools sudo git nodejs +npm install -g configurable-http-proxy yarn --registry=https://registry.npmmirror.com # 创建新用户 useradd -m -s /bin/bash ${CREATE_USER} echo "${CREATE_USER}:${CREATE_USER_PASSWD}" | chpasswd @@ -100,11 +105,7 @@ EOT # 安装 Jupyter 和相关软件 RUN <=6.25.0 jupyterlab-language-pack-zh-CN jupyterlab-git jupyterlab-system-monitor jupyter_nbextensions_configurator jupyter_contrib_nbextensions jupyterlab_widgets jupyterlab-drawio jupyterlab-spreadsheet-editor jupyterlab-cell-flash jedi-language-server jupyterlab_code_formatter jupyterlab-spellchecker jupyterlab_vim nbresuse ipydrawio jedi ipympl black isort theme-darcula ipywidgets tensorboard jupyterlab_latex jupyter_bokeh autopep8 xeus-python jupyterlab-lsp python-lsp-server dockerspawner jupyterhub-nativeauthenticator lckr_jupyterlab_variableinspector -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com EOT @@ -178,8 +179,16 @@ RUN <