Add install_v2.sh

This commit is contained in:
RomanNum3ral 2025-09-30 15:25:29 +00:00
parent 617b253e96
commit f9c830767a
1 changed files with 27 additions and 0 deletions

27
install_v2.sh Normal file
View File

@ -0,0 +1,27 @@
#!/bin/bash
set -euo pipefail
# --- Update & Upgrade machine ---
apt update
apt upgrade -y
# --- Install prerequisites ---
apt install -y python3 python3-dev git curl gdebi-core \
software-properties-common dirmngr gnupg apt-transport-https \
libssl-dev libcurl4-openssl-dev libxml2-dev
# --- Install R (from Ubuntu repos, CRAN packages available) ---
apt install -y r-base
# --- Install RStudio Server (Jammy build works on Noble) ---
RSTUDIO_DEB="rstudio-server-latest-amd64.deb"
curl -LO https://download2.rstudio.org/server/jammy/amd64/${RSTUDIO_DEB}
gdebi -n ${RSTUDIO_DEB}
rm -f ${RSTUDIO_DEB}
# --- Install JupyterHub (The Littlest JupyterHub) ---
curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3 - --admin anon
# --- Add R kernel to Jupyter ---
R -e "install.packages('IRkernel', repos='http://cran.r-project.org')"
R -e "IRkernel::installspec(user = FALSE)"