From 22a388d557fd41846dcadaeee960171857398352 Mon Sep 17 00:00:00 2001 From: Balaji Alwar Date: Fri, 31 May 2024 12:06:54 -0700 Subject: [PATCH 1/6] Install jupyterlab extension via postbuild + increase a11y hub RAM to 3GB --- deployments/a11y/config/common.yaml | 4 ++-- deployments/a11y/image/postBuild | 32 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/deployments/a11y/config/common.yaml b/deployments/a11y/config/common.yaml index dedbd1dd7..f368e5284 100644 --- a/deployments/a11y/config/common.yaml +++ b/deployments/a11y/config/common.yaml @@ -53,5 +53,5 @@ jupyterhub: pvcName: home-nfs-v3 subPath: "{username}" memory: - guarantee: 512M - limit: 1G + guarantee: 3G + limit: 3G diff --git a/deployments/a11y/image/postBuild b/deployments/a11y/image/postBuild index 383c5b00d..5f16b8dd9 100644 --- a/deployments/a11y/image/postBuild +++ b/deployments/a11y/image/postBuild @@ -5,3 +5,35 @@ set -eux npm install -g pa11y-ci@3.1.0 npm install -g pa11y@6.2.3 + +# Install Node.js and Yarn for DH-299 +echo "Installing Node.js and Yarn..." +sudo apt-get update && sudo apt-get install -y nodejs npm +sudo npm install -g yarn + +# Clone the JupyterLab extension repository +EXTENSION_GIT_REPO="https://github.com/berkeley-dsep-infra/jupyterlab-a11y-checker.git" +EXTENSION_NAME="jupyterlab-a11y-checker" +echo "Cloning the JupyterLab extension repository..." +git clone $EXTENSION_GIT_REPO + +# Navigate to the extension directory +cd $EXTENSION_NAME + +# Install the extension using yarn +echo "Installing the JupyterLab extension..." +yarn install +yarn build + +# Install the extension in JupyterLab +jupyter labextension install . + +# Rebuild JupyterLab to include the new extension +echo "Rebuilding JupyterLab..." +jupyter lab build + +# Clean up +cd .. +rm -rf $EXTENSION_NAME + +echo "JupyterLab extension installed successfully!" \ No newline at end of file From ae89bcbe5e658a07191b4f6a893078064c7854f6 Mon Sep 17 00:00:00 2001 From: Balaji Alwar Date: Fri, 31 May 2024 12:21:10 -0700 Subject: [PATCH 2/6] Remove sudo from psotbuild --- deployments/a11y/image/postBuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployments/a11y/image/postBuild b/deployments/a11y/image/postBuild index 5f16b8dd9..38f8ed192 100644 --- a/deployments/a11y/image/postBuild +++ b/deployments/a11y/image/postBuild @@ -8,8 +8,8 @@ npm install -g pa11y@6.2.3 # Install Node.js and Yarn for DH-299 echo "Installing Node.js and Yarn..." -sudo apt-get update && sudo apt-get install -y nodejs npm -sudo npm install -g yarn +apt-get update && apt-get install -y nodejs npm +npm install -g yarn # Clone the JupyterLab extension repository EXTENSION_GIT_REPO="https://github.com/berkeley-dsep-infra/jupyterlab-a11y-checker.git" From 13ee877d0b162ec9112075665be24df0495e6060 Mon Sep 17 00:00:00 2001 From: ryanlovett Date: Mon, 3 Jun 2024 16:20:03 -0700 Subject: [PATCH 3/6] Install git from conda-forge. Jammy's git is too old to support gh-scoped-creds, so install from conda-forge. --- deployments/datahub/images/default/environment.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deployments/datahub/images/default/environment.yml b/deployments/datahub/images/default/environment.yml index 6bddc73d6..e84ff3859 100644 --- a/deployments/datahub/images/default/environment.yml +++ b/deployments/datahub/images/default/environment.yml @@ -9,6 +9,9 @@ dependencies: - syncthing==1.18.6 - nbclassic==1.0.0 +# gh-scoped-creds needs a newer version of git than what jammy provides +- git==2.45.1 + # pymc3 needs this - mkl-service=2.4.* From 522beda1b2c3fcce90f503b323165f7ced6a9f91 Mon Sep 17 00:00:00 2001 From: ryanlovett Date: Mon, 3 Jun 2024 16:40:36 -0700 Subject: [PATCH 4/6] Bump memory for admins. mamba/conda is starting to consume more than 1G for simple package installs. Bump memory for admins at least, so that we have some headrooms. Also remove `admin` since that is safely replaced by a discrete role. --- deployments/datahub/config/common.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deployments/datahub/config/common.yaml b/deployments/datahub/config/common.yaml index 6492e68b6..18b79fcc6 100644 --- a/deployments/datahub/config/common.yaml +++ b/deployments/datahub/config/common.yaml @@ -133,7 +133,8 @@ jupyterhub: # DataHub Infrastructure staff # https://bcourses.berkeley.edu/courses/1524699/groups#tab-80607 course::1524699::group::all-admins: - admin: true + mem_limit: 2048M + mem_guarantee: 2048M # Demog Data Event, April 1 - Sep 30, https://github.com/berkeley-dsep-infra/datahub/issues/5643 course::1534506::enrollment_type::teacher: From 00dd7f4f529d4daa8a39f8b818c81fcba96a9c87 Mon Sep 17 00:00:00 2001 From: Balaji Alwar Date: Tue, 4 Jun 2024 16:59:33 -0700 Subject: [PATCH 5/6] Installing lab extension from pypi and removing it via postbuild --- deployments/a11y/image/environment.yml | 1 + deployments/a11y/image/postBuild | 34 +------------------------- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/deployments/a11y/image/environment.yml b/deployments/a11y/image/environment.yml index bf59bd0b5..fdb1a5fa3 100644 --- a/deployments/a11y/image/environment.yml +++ b/deployments/a11y/image/environment.yml @@ -35,6 +35,7 @@ dependencies: - nbconvert-a11y==2023.12.6 - nb2pdf==0.6.2 - nbpdfexport==0.2.1 + - jupyterlab-a11y-checker==0.1.1 # ### # The items below are from infra-requirements, however lab conflicts with the # alpha notebook. diff --git a/deployments/a11y/image/postBuild b/deployments/a11y/image/postBuild index 38f8ed192..ec5f61cb1 100644 --- a/deployments/a11y/image/postBuild +++ b/deployments/a11y/image/postBuild @@ -4,36 +4,4 @@ set -eux # install pa11y tools for DH-169 npm install -g pa11y-ci@3.1.0 -npm install -g pa11y@6.2.3 - -# Install Node.js and Yarn for DH-299 -echo "Installing Node.js and Yarn..." -apt-get update && apt-get install -y nodejs npm -npm install -g yarn - -# Clone the JupyterLab extension repository -EXTENSION_GIT_REPO="https://github.com/berkeley-dsep-infra/jupyterlab-a11y-checker.git" -EXTENSION_NAME="jupyterlab-a11y-checker" -echo "Cloning the JupyterLab extension repository..." -git clone $EXTENSION_GIT_REPO - -# Navigate to the extension directory -cd $EXTENSION_NAME - -# Install the extension using yarn -echo "Installing the JupyterLab extension..." -yarn install -yarn build - -# Install the extension in JupyterLab -jupyter labextension install . - -# Rebuild JupyterLab to include the new extension -echo "Rebuilding JupyterLab..." -jupyter lab build - -# Clean up -cd .. -rm -rf $EXTENSION_NAME - -echo "JupyterLab extension installed successfully!" \ No newline at end of file +npm install -g pa11y@6.2.3 \ No newline at end of file From 06a09e5617180f1568f5426f08d472abf17f6268 Mon Sep 17 00:00:00 2001 From: shane knapp Date: Thu, 6 Jun 2024 11:52:47 -0700 Subject: [PATCH 6/6] update CI before we push out the new image --- .circleci/config.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 00032e729..9fa508f65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -745,15 +745,15 @@ workflows: branches: only: - staging - #- hubploy/build-image: - # deployment: logodev - # name: logodev image build - # push: true - # # Filters can only be per-job? wtf - # filters: - # branches: - # only: - # - staging + - hubploy/build-image: + deployment: logodev + name: logodev image build + push: true + # Filters can only be per-job? wtf + filters: + branches: + only: + - staging - hubploy/build-image: deployment: publichealth name: publichealth image build @@ -810,7 +810,7 @@ workflows: - eecs image build - ischool image build - julia hub image build - #- logodev image build + - logodev image build - publichealth image build - shiny image build - stat159 image build