From e11b19d33e180d39e739ed0907663bcd87f0d888 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 23 Sep 2024 01:33:08 -0700 Subject: [PATCH 1/4] feat(jupyter): switch from pip3 to pipx for Jupyter install (#294) --- jupyter-notebook/run.sh | 14 +++++++------- jupyterlab/main.test.ts | 12 ++++++------ jupyterlab/run.sh | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/jupyter-notebook/run.sh b/jupyter-notebook/run.sh index 4f8c4a2..0c7a9b8 100755 --- a/jupyter-notebook/run.sh +++ b/jupyter-notebook/run.sh @@ -7,14 +7,14 @@ printf "$${BOLD}Installing jupyter-notebook!\n" # check if jupyter-notebook is installed if ! command -v jupyter-notebook > /dev/null 2>&1; then # install jupyter-notebook - # check if python3 pip is installed - if ! command -v pip3 > /dev/null 2>&1; then - echo "pip3 is not installed" - echo "Please install pip3 in your Dockerfile/VM image before running this script" + # check if pipx is installed + if ! command -v pipx > /dev/null 2>&1; then + echo "pipx is not installed" + echo "Please install pipx in your Dockerfile/VM image before using this module" exit 1 fi - # install jupyter-notebook - pip3 install --upgrade --no-cache-dir --no-warn-script-location jupyter + # install jupyter notebook + pipx install -q notebook echo "🥳 jupyter-notebook has been installed\n\n" else echo "🥳 jupyter-notebook is already installed\n\n" @@ -22,4 +22,4 @@ fi echo "👷 Starting jupyter-notebook in background..." echo "check logs at ${LOG_PATH}" -$HOME/.local/bin/jupyter notebook --NotebookApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 & +$HOME/.local/bin/jupyter-notebook --NotebookApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 & diff --git a/jupyterlab/main.test.ts b/jupyterlab/main.test.ts index 2597dc2..122de77 100644 --- a/jupyterlab/main.test.ts +++ b/jupyterlab/main.test.ts @@ -22,7 +22,7 @@ const executeScriptInContainerWithPip = async ( }> => { const instance = findResourceInstance(state, "coder_script"); const id = await runContainer(image); - const respPip = await execContainer(id, [shell, "-c", "apk add py3-pip"]); + const respPipx = await execContainer(id, [shell, "-c", "apk add pipx"]); const resp = await execContainer(id, [shell, "-c", instance.script]); const stdout = resp.stdout.trim().split("\n"); const stderr = resp.stderr.trim().split("\n"); @@ -40,7 +40,7 @@ describe("jupyterlab", async () => { agent_id: "foo", }); - it("fails without pip3", async () => { + it("fails without pipx", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", }); @@ -48,14 +48,14 @@ describe("jupyterlab", async () => { expect(output.exitCode).toBe(1); expect(output.stdout).toEqual([ "\u001B[0;1mInstalling jupyterlab!", - "pip3 is not installed", - "Please install pip3 in your Dockerfile/VM image before running this script", + "pipx is not installed", + "Please install pipx in your Dockerfile/VM image before running this script", ]); }); - // TODO: Add faster test to run with pip3. + // TODO: Add faster test to run with pipx. // currently times out. - // it("runs with pip3", async () => { + // it("runs with pipx", async () => { // ... // const output = await executeScriptInContainerWithPip(state, "alpine"); // ... diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index b040cec..0245b06 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -7,14 +7,14 @@ printf "$${BOLD}Installing jupyterlab!\n" # check if jupyterlab is installed if ! command -v jupyterlab > /dev/null 2>&1; then # install jupyterlab - # check if python3 pip is installed - if ! command -v pip3 > /dev/null 2>&1; then - echo "pip3 is not installed" - echo "Please install pip3 in your Dockerfile/VM image before running this script" + # check if pipx is installed + if ! command -v pipx > /dev/null 2>&1; then + echo "pipx is not installed" + echo "Please install pipx in your Dockerfile/VM image before running this script" exit 1 fi # install jupyterlab - pip3 install --upgrade --no-cache-dir --no-warn-script-location jupyterlab + pipx install -q jupyterlab echo "🥳 jupyterlab has been installed\n\n" else echo "🥳 jupyterlab is already installed\n\n" @@ -22,4 +22,4 @@ fi echo "👷 Starting jupyterlab in background..." echo "check logs at ${LOG_PATH}" -$HOME/.local/bin/jupyter lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 & +$HOME/.local/bin/jupyter-lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' > ${LOG_PATH} 2>&1 & From 7a9f553564292d479038084891d15cdabd82de62 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 24 Sep 2024 11:24:02 -0700 Subject: [PATCH 2/4] chore(cursor): update display_name to Cursor Desktop (#300) --- cursor/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cursor/main.tf b/cursor/main.tf index 4d48191..f350f94 100644 --- a/cursor/main.tf +++ b/cursor/main.tf @@ -40,7 +40,7 @@ resource "coder_app" "cursor" { external = true icon = "/icon/cursor.svg" slug = "cursor" - display_name = "Cursor IDE" + display_name = "Cursor Desktop" order = var.order url = join("", [ "cursor://coder.coder-remote/open", From 04535a9cd701a278a05ecef65b500aff8e850a29 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 24 Sep 2024 12:12:30 -0700 Subject: [PATCH 3/4] chore: add dependabot.yml (#302) --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From 94e126f2484edbd7c30930e5055f37a11805654f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 00:16:11 +0500 Subject: [PATCH 4/4] chore(deps): bump oven-sh/setup-bun from 1 to 2 (#305) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 960cd03..2b337d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Setup @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Setup