From 8b6b464a6155bdd9dbac2c7e927deb1b0612f827 Mon Sep 17 00:00:00 2001 From: Becky Smith Date: Fri, 22 Nov 2024 16:03:10 +0000 Subject: [PATCH] Update to use r:latest in codespace --- .devcontainer/devcontainer.json | 2 +- docs_src/index.md | 7 ------- scripts/configure_r_image.sh | 7 ------- scripts/post_start.sh | 18 ------------------ scripts/update_r_instructions | 3 --- 5 files changed, 1 insertion(+), 36 deletions(-) delete mode 100755 scripts/configure_r_image.sh delete mode 100755 scripts/post_start.sh delete mode 100644 scripts/update_r_instructions diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 403ad1b..a38868b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,7 @@ "ghcr.io/devcontainers/features/docker-in-docker:2": {} }, "postCreateCommand": "/bin/bash /opt/devcontainer/postCreate.sh ${containerWorkspaceFolder}", - "postStartCommand": "./scripts/post_start.sh", + "postStartCommand": "opensafely pull ehrql", "postAttachCommand": "/bin/bash /opt/devcontainer/postAttach.sh", "forwardPorts": [ 8787 diff --git a/docs_src/index.md b/docs_src/index.md index f9649c2..97e128e 100644 --- a/docs_src/index.md +++ b/docs_src/index.md @@ -44,13 +44,6 @@ You may see a page requesting additional permissions on `opensafely/server-instr The codespace will take a few minutes to launch. Please wait! -!!! Warning - The codespace will launch with the updated version of ehrQL and R that you need - for this workshop. You should ignore any terminal reminders to run `opensafely pull`, - as this will replace the custom R images that we are using. If you need to, you can - update the R images again by running `update_r` in your codespace terminal. - - ## Saving changes to your repo If you make changes to your repo during the workshop that you would like to keep, you diff --git a/scripts/configure_r_image.sh b/scripts/configure_r_image.sh deleted file mode 100755 index e962817..0000000 --- a/scripts/configure_r_image.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -docker pull --platform linux/amd64 remlapmot/r-docker:r-v2-for-will -docker tag remlapmot/r-docker:r-v2-for-will ghcr.io/opensafely-core/r:latest -docker pull --platform linux/amd64 remlapmot/r-docker:rstudio-v2-for-will -docker tag remlapmot/r-docker:rstudio-v2-for-will ghcr.io/opensafely-core/rstudio:latest - diff --git a/scripts/post_start.sh b/scripts/post_start.sh deleted file mode 100755 index a325fc9..0000000 --- a/scripts/post_start.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# make sure we have the ehrql image ready to go -opensafely pull ehrql - -# Pull and tag replacement R images -./scripts/configure_r_image.sh - -# Add an extra instruction and alias for updating the custom R images -echo "alias update_r=./scripts/configure_r_image.sh" >> /home/rstudio/.bashrc - -grep -q "Run update_r" /home/rstudio/.bashrc -if [ $? -eq 1 ]; then - echo "cat ./scripts/update_r_instructions" >> /home/rstudio/.bashrc -fi - -# reload .bashrc to get the update_r command -source /home/rstudio/.bashrc diff --git a/scripts/update_r_instructions b/scripts/update_r_instructions deleted file mode 100644 index 5177f7e..0000000 --- a/scripts/update_r_instructions +++ /dev/null @@ -1,3 +0,0 @@ - -Run update_r in a terminal if you need to reset the r images for this workshop -