From 87ab5537877e44a19ab71ecfbde55867deaab1d6 Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Wed, 1 Nov 2023 13:58:29 +0000 Subject: [PATCH 1/8] add nvidia cuda toolkit to msc --- modules/msc_custom.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/msc_custom.sh b/modules/msc_custom.sh index 5b571a8..55c1199 100644 --- a/modules/msc_custom.sh +++ b/modules/msc_custom.sh @@ -46,6 +46,10 @@ echo "export LD_LIBRARY_PATH=$CUDNN_PATH:$HOME/conda/envs/msc/lib/:\$LD_LIBRARY_ from tensorflow.keras.applications import EfficientNetB0; \ model = EfficientNetB0(weights='imagenet')" +###################################################################### +# CUDA Toolkit +#sudo apt install -y nvidia-cuda-toolkit + ###################################################################### # Jupyter Notebook shortcut sudo tee /usr/local/bin/nb < Date: Wed, 1 Nov 2023 13:58:51 +0000 Subject: [PATCH 2/8] Only swapon if /swap-hibinit exists --- modules/autohibernate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/autohibernate.sh b/modules/autohibernate.sh index 0a3a4ab..3629813 100644 --- a/modules/autohibernate.sh +++ b/modules/autohibernate.sh @@ -27,7 +27,8 @@ if [ \$(xprintidle) -gt \$AUTOHIBERNATE_TIME ] ; then xdotool mousemove 0 0 # reset idle time # We need to enable the swap file to dump RAM to. - sudo swapon /swap-hibinit + [ -f /swap-hibinit] && \\ + sudo swapon /swap-hibinit # Just in case there is a client connected to the VNC server (there # shouldn't be), we should disconnect them to avoid confusing it From b4760c1e9f88ae6e03bceed233b5360fad8b36c3 Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Wed, 1 Nov 2023 13:59:07 +0000 Subject: [PATCH 3/8] add firefox to base ubuntu --- modules/base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/base.sh b/modules/base.sh index cc93f01..3603f1d 100644 --- a/modules/base.sh +++ b/modules/base.sh @@ -11,7 +11,7 @@ sudo apt-get -y -q update sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q \ jq \ tigervnc-standalone-server \ - ubuntu-mate-desktop + ubuntu-mate-desktop firefox # Don't boot into desktop (graphical.target) sudo systemctl set-default multi-user.target From 9fb390bcac9582896844b8e0a004af6f4a277d3d Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Wed, 1 Nov 2023 14:08:18 +0000 Subject: [PATCH 4/8] Upgrade R and R Studio - fixes #17 --- modules/rstudio.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/rstudio.ps1 b/modules/rstudio.ps1 index 48bf906..5516125 100644 --- a/modules/rstudio.ps1 +++ b/modules/rstudio.ps1 @@ -3,13 +3,13 @@ Set-Location C:\Tools $ProgressPreference = "SilentlyContinue" # PS progress bar is slow # R environment -Invoke-WebRequest -Uri "https://cloud.r-project.org/bin/windows/base/old/4.1.3/R-4.1.3-win.exe" -OutFile C:\Tools\R-installer.exe +Invoke-WebRequest -Uri "https://cloud.r-project.org/bin/windows/base/R-4.3.2-win.exe" -OutFile C:\Tools\R-installer.exe Start-Process C:\Tools\R-installer.exe -ArgumentList "/VERYSILENT","/NORESTART" -NoNewWindow -Wait -PassThru -Invoke-WebRequest -Uri "https://download1.rstudio.org/desktop/windows/RStudio-2022.02.1-461.exe" -OutFile C:\Tools\RStudio-installer.exe +Invoke-WebRequest -Uri "https://s3.amazonaws.com/rstudio-ide-build/electron/windows/RStudio-2023.09.1-494.exe" -OutFile C:\Tools\RStudio-installer.exe Start-Process C:\Tools\RStudio-installer.exe -ArgumentList "/S" -NoNewWindow -Wait -PassThru -Invoke-WebRequest -Uri "https://github.com/r-windows/rtools-installer/releases/download/2022-02-06/rtools40-x86_64.exe" -OutFile C:\Tools\RTools.exe +Invoke-WebRequest -Uri "https://cran.r-project.org/bin/windows/Rtools/rtools43/files/rtools43-5863-5818.exe" -OutFile C:\Tools\RTools.exe Start-Process C:\Tools\RTools.exe -ArgumentList "/VERYSILENT" -NoNewWindow -Wait -PassThru $RConfig = @" From 360215ea3bc8b161e77d18b42be194f91b4de360 Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Wed, 1 Nov 2023 14:26:48 +0000 Subject: [PATCH 5/8] Bump Win LibreOffice to 7.6.2 --- modules/libreoffice.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/libreoffice.ps1 b/modules/libreoffice.ps1 index d0f4882..3fd39e5 100644 --- a/modules/libreoffice.ps1 +++ b/modules/libreoffice.ps1 @@ -3,8 +3,8 @@ $ProgressPreference = 'SilentlyContinue' # Disable (slow) progress bar Set-Location C:\Tools -$LIBRE_VERSION = "7.5.4" -$LIBRE_HASH = "efca7b819427f709960437dc4f0c603d1a4f928493836781929f5472b376b864" +$LIBRE_VERSION = "7.6.2" +$LIBRE_HASH = "f6a3f0794b957e7e95219064639b2a67a315158e614c8cee58a352286b8f38ed" $LIBRE_URL = "https://mirrors.ukfast.co.uk/sites/documentfoundation.org/tdf/libreoffice/stable/${LIBRE_VERSION}/win/x86_64/LibreOffice_${LIBRE_VERSION}_Win_x86-64.msi" From 29fe4fb93662551c3431b207be429e68f37c178f Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Wed, 1 Nov 2023 14:27:09 +0000 Subject: [PATCH 6/8] Add OpenJDK module Fixes #18 Will require an addition to configs. Didn't want to add it to base module --- modules/openjdk.ps1 | 15 +++++++++++++++ modules/openjdk.sh | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 modules/openjdk.ps1 create mode 100644 modules/openjdk.sh diff --git a/modules/openjdk.ps1 b/modules/openjdk.ps1 new file mode 100644 index 0000000..8121edc --- /dev/null +++ b/modules/openjdk.ps1 @@ -0,0 +1,15 @@ +$ProgressPreference = 'SilentlyContinue' # Disable (slow) progress bar + +Set-Location C:\Tools + +$OPENJDK_URL="https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jdk_x64_windows_hotspot_17.0.9_9.msi" +$OPENJDK_HASH="cd7b319f6fbd7efc68a0e464c55c7f2a28d6b8be3d0bcda315a16f885c57cadb" + +Invoke-WebRequest -Uri ${OPENJDK_URL} -OutFile OpenJDK17.msi +$hash = Get-FileHash -Path OpenJDK17.msi -Algorithm SHA256 + +if ( ${OPENJDK_HASH} -ne $hash.Hash ) { + throw("Invalid OpenJDK installer hash") +} + +msiexec /i OpenJDK17.msi ADDLOCAL=FeatureJavaHome /quiet diff --git a/modules/openjdk.sh b/modules/openjdk.sh new file mode 100644 index 0000000..6744bda --- /dev/null +++ b/modules/openjdk.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -eu + +sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ + wget apt-transport-https gnupg +sudo apt-get -y -q update +sudo DEBIAN_FRONTEND=noninteractive apt-get install -y temurin-17-jdk From 1725813ac219b054aa960239af4afd5181503342 Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Wed, 1 Nov 2023 15:16:38 +0000 Subject: [PATCH 7/8] PowerBI version bump --- modules/powerpi.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/powerpi.ps1 b/modules/powerpi.ps1 index d9e597c..7c20948 100644 --- a/modules/powerpi.ps1 +++ b/modules/powerpi.ps1 @@ -2,7 +2,7 @@ Set-Location C:\Tools $ProgressPreference = "SilentlyContinue" # PS progress bar is slow -$PBI_HASH = "511e86ab13e204a00b73301e70deb40e323f6c809277b8200df7160ea2a1bc4b" +$PBI_HASH = "250e751657a0de99da2bf6e5c1332e0e6f563aa71c0a3a52478ba6253318b267" $PBI_URL = "https://download.microsoft.com/download/8/8/0/880BCA75-79DD-466A-927D-1ABF1F5454B0/PBIDesktopSetup_x64.exe" Invoke-WebRequest -Uri ${PBI_URL} -OutFile PBIDesktopSetup_x64.exe From d4fc8c3e7b6d92f04b5f3eb078e470142b1d5e89 Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Thu, 2 Nov 2023 09:42:39 +0000 Subject: [PATCH 8/8] fix Rprofile.site path in rstudio.ps1 module --- modules/rstudio.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rstudio.ps1 b/modules/rstudio.ps1 index 5516125..2493687 100644 --- a/modules/rstudio.ps1 +++ b/modules/rstudio.ps1 @@ -25,5 +25,5 @@ local({r <- getOption("repos") # Set timezone Sys.setenv(TZ='Europe/London') "@ -Set-Content "C:\Program Files\R\R-4.1.3\etc\Rprofile.site" $RConfig +Set-Content "C:\Program Files\R\R-4.3.2\etc\Rprofile.site" $RConfig Set-Content "C:\Users\Administrator\Documents\.Renviron" "RSTUDIO_DISABLE_SECURE_DOWNLOAD_WARNING=1"