From b88de4c4ad5f55cacd576faa922a762c0b795c02 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Mon, 24 Feb 2025 20:56:03 +0000 Subject: [PATCH 01/12] feat: unset http proxy... --- jupyterlab/run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index 2dd34ace..b09b91b1 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -46,6 +46,13 @@ else printf "%s\n\n" "🥳 jupyterlab is already installed" fi + +printf "☢️ unsetting proxy vars..." +unset http_proxy +unset https_proxy +unset HTTP_PROXY +unset HTTPS_PROXY + printf "👷 Starting jupyterlab in background..." printf "check logs at ${LOG_PATH}" $JUPYTERPATH/jupyter-lab --no-browser \ From cc56b84d2c2c9a712054783fef89e007f72c8216 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 10:25:18 +0000 Subject: [PATCH 02/12] Update run.sh --- jupyterlab/run.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index b09b91b1..8dd73a4c 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -1,13 +1,6 @@ #!/usr/bin/env sh INSTALLER="" check_available_installer() { - # check if pipx is installed - echo "Checking for a supported installer" - if command -v pipx > /dev/null 2>&1; then - echo "pipx is installed" - INSTALLER="pipx" - return - fi # check if uv is installed if command -v uv > /dev/null 2>&1; then echo "uv is installed" From 9f91d705bd630c7c63d0c7c6126be9f282acf46e Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 10:30:19 +0000 Subject: [PATCH 03/12] Update run.sh --- jupyterlab/run.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index 8dd73a4c..c416f144 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -25,15 +25,11 @@ if ! command -v jupyter-lab > /dev/null 2>&1; then printf "$${BOLD}Installing jupyterlab!\n" case $INSTALLER in uv) + uv venv --seed uv pip install -q jupyterlab \ && printf "%s\n" "🥳 jupyterlab has been installed" JUPYTERPATH="$HOME/.venv/bin/" ;; - pipx) - pipx install jupyterlab \ - && printf "%s\n" "🥳 jupyterlab has been installed" - JUPYTERPATH="$HOME/.local/bin" - ;; esac else printf "%s\n\n" "🥳 jupyterlab is already installed" @@ -48,6 +44,7 @@ unset HTTPS_PROXY printf "👷 Starting jupyterlab in background..." printf "check logs at ${LOG_PATH}" + $JUPYTERPATH/jupyter-lab --no-browser \ "$BASE_URL_FLAG" \ --ServerApp.ip='*' \ From 7bac87dd1435abec41ab2da6fd4f17671256f0b0 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 11:17:20 +0000 Subject: [PATCH 04/12] Update run.sh --- jupyterlab/run.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index c416f144..a02e9c63 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -37,10 +37,8 @@ fi printf "☢️ unsetting proxy vars..." -unset http_proxy -unset https_proxy -unset HTTP_PROXY -unset HTTPS_PROXY +export http_proxy=http://$http_proxy +export https_proxy=http://$https_proxy printf "👷 Starting jupyterlab in background..." printf "check logs at ${LOG_PATH}" From acf82e36dc8548b4011944eb0ed71d9e1bb44af5 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 11:18:53 +0000 Subject: [PATCH 05/12] Update run.sh --- jupyterlab/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index a02e9c63..2119e4a0 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -38,7 +38,7 @@ fi printf "☢️ unsetting proxy vars..." export http_proxy=http://$http_proxy -export https_proxy=http://$https_proxy +export https_proxy=https://$https_proxy printf "👷 Starting jupyterlab in background..." printf "check logs at ${LOG_PATH}" From c45aadb4b8c71893bb2532094fb4dc78a586a04e Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 11:25:14 +0000 Subject: [PATCH 06/12] Update run.sh --- jupyterlab/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index 2119e4a0..957f24f3 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -38,7 +38,7 @@ fi printf "☢️ unsetting proxy vars..." export http_proxy=http://$http_proxy -export https_proxy=https://$https_proxy +#export https_proxy=https://$https_proxy printf "👷 Starting jupyterlab in background..." printf "check logs at ${LOG_PATH}" From 18a8aa1cb1f2162c5f2ca89872c6e9b303bc0305 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 12:03:15 +0000 Subject: [PATCH 07/12] Update run.sh --- jupyterlab/run.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index 957f24f3..f75bbbb7 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -36,14 +36,18 @@ else fi -printf "☢️ unsetting proxy vars..." -export http_proxy=http://$http_proxy -#export https_proxy=https://$https_proxy +printf "⚠️ setting proxy vars..." +cat $HOME/.venv/share/jupyter/kernels/python3/kernel.json | jq -r \ + --arg http_proxy "$http_proxy" \ + --arg https_proxy "$https_proxy" \ + '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' \ + > $HOME/.venv/share/jupyter/kernels/python3/kernel.json + printf "👷 Starting jupyterlab in background..." printf "check logs at ${LOG_PATH}" -$JUPYTERPATH/jupyter-lab --no-browser \ +http_proxy= https_proxy= $JUPYTERPATH/jupyter-lab --no-browser \ "$BASE_URL_FLAG" \ --ServerApp.ip='*' \ --ServerApp.port="${PORT}" \ From 05e93db3cc6fdc7de251f2c44c9daad67faf60bb Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 12:09:08 +0000 Subject: [PATCH 08/12] Update run.sh --- jupyterlab/run.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index f75bbbb7..b89e9201 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -26,7 +26,8 @@ if ! command -v jupyter-lab > /dev/null 2>&1; then case $INSTALLER in uv) uv venv --seed - uv pip install -q jupyterlab \ + uv pip install ipykernel jupyterlab + uv run ipython kernel install --user --env VIRTUAL_ENV $(pwd)/.venv --name=aicentre \ && printf "%s\n" "🥳 jupyterlab has been installed" JUPYTERPATH="$HOME/.venv/bin/" ;; @@ -37,11 +38,11 @@ fi printf "⚠️ setting proxy vars..." -cat $HOME/.venv/share/jupyter/kernels/python3/kernel.json | jq -r \ +cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r \ --arg http_proxy "$http_proxy" \ --arg https_proxy "$https_proxy" \ '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' \ - > $HOME/.venv/share/jupyter/kernels/python3/kernel.json + > $HOME/.local/share/jupyter/kernels/aicentre/kernel.json printf "👷 Starting jupyterlab in background..." From 63e9729c4c9b2181f4e00134033fa6bcaa2ae253 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 12:13:55 +0000 Subject: [PATCH 09/12] Update run.sh --- jupyterlab/run.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index b89e9201..7fb33c00 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -41,8 +41,7 @@ printf "⚠️ setting proxy vars..." cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r \ --arg http_proxy "$http_proxy" \ --arg https_proxy "$https_proxy" \ - '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' \ - > $HOME/.local/share/jupyter/kernels/aicentre/kernel.json + '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' > $HOME/.local/share/jupyter/kernels/aicentre/kernel.json printf "👷 Starting jupyterlab in background..." From a18d9c83223050475fbfa7826ffa6e001f3a7556 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 12:18:20 +0000 Subject: [PATCH 10/12] Update run.sh --- jupyterlab/run.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index 7fb33c00..7e2342b4 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -38,10 +38,7 @@ fi printf "⚠️ setting proxy vars..." -cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r \ - --arg http_proxy "$http_proxy" \ - --arg https_proxy "$https_proxy" \ - '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' > $HOME/.local/share/jupyter/kernels/aicentre/kernel.json +cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r --arg http_proxy "$http_proxy" --arg https_proxy "$https_proxy" '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' > $HOME/.local/share/jupyter/kernels/aicentre/kernel.json printf "👷 Starting jupyterlab in background..." From 06fc6a6a79b05507751d47527b2821512a004f47 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 12:19:44 +0000 Subject: [PATCH 11/12] Update run.sh --- jupyterlab/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index 7e2342b4..2a788542 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -38,7 +38,7 @@ fi printf "⚠️ setting proxy vars..." -cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r --arg http_proxy "$http_proxy" --arg https_proxy "$https_proxy" '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' > $HOME/.local/share/jupyter/kernels/aicentre/kernel.json +cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r --arg http_proxy "$http_proxy" --arg https_proxy "$https_proxy" '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' printf "👷 Starting jupyterlab in background..." From d044141d51ac84c9c2edcda44b80a535556f4782 Mon Sep 17 00:00:00 2001 From: Lawrence Adams Date: Tue, 25 Feb 2025 12:22:16 +0000 Subject: [PATCH 12/12] Update run.sh --- jupyterlab/run.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index 2a788542..f5222520 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -38,8 +38,14 @@ fi printf "⚠️ setting proxy vars..." -cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r --arg http_proxy "$http_proxy" --arg https_proxy "$https_proxy" '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' - +cat $HOME/.local/share/jupyter/kernels/aicentre/kernel.json | jq -r \ + --arg http_proxy "$http_proxy" \ + --arg https_proxy "$https_proxy" \ + '.env += {"http_proxy": $http_proxy, "https_proxy": $https_proxy}' \ + > tmp.json + +printf "➡️ updating kernelspec..." +mv tmp.json $HOME/.local/share/jupyter/kernels/aicentre/kernel.json printf "👷 Starting jupyterlab in background..." printf "check logs at ${LOG_PATH}"