Skip to content

Commit

Permalink
fix: use gdebi-core to install RStudio (#805)
Browse files Browse the repository at this point in the history
python-setuptools is no longer available on Ubuntu 24.04.
  • Loading branch information
eitsupi authored Aug 9, 2024
2 parents f7161ec + f59930c commit 634deea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 36 deletions.
20 changes: 9 additions & 11 deletions scripts/install_rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,12 @@ function apt_install() {

apt_install \
ca-certificates \
lsb-release \
file \
gdebi-core \
git \
libapparmor1 \
libclang-dev \
libcurl4-openssl-dev \
libedit2 \
libobjc4 \
libssl-dev \
libpq5 \
lsb-release \
psmisc \
procps \
python-setuptools \
pwgen \
sudo \
wget
Expand All @@ -58,6 +51,11 @@ if [ "$UBUNTU_CODENAME" = "focal" ]; then
UBUNTU_CODENAME="bionic"
fi

# TODO: remove this workaround for Ubuntu 24.04
if [ "$UBUNTU_CODENAME" = "noble" ]; then
UBUNTU_CODENAME="jammy"
fi

if [ "$RSTUDIO_VERSION" = "stable" ] || [ "$RSTUDIO_VERSION" = "preview" ] || [ "$RSTUDIO_VERSION" = "daily" ]; then
if [ "$UBUNTU_CODENAME" = "bionic" ]; then
UBUNTU_CODENAME="focal"
Expand All @@ -68,7 +66,7 @@ else
wget "https://s3.amazonaws.com/rstudio-ide-build/server/${UBUNTU_CODENAME}/${ARCH}/rstudio-server-${RSTUDIO_VERSION/"+"/"-"}-${ARCH}.deb" -O "$DOWNLOAD_FILE"
fi

dpkg -i "$DOWNLOAD_FILE"
gdebi --non-interactive "$DOWNLOAD_FILE"
rm "$DOWNLOAD_FILE"

ln -fs /usr/lib/rstudio-server/bin/rstudio-server /usr/local/bin
Expand All @@ -83,7 +81,7 @@ mkdir -p /etc/R
## Make RStudio compatible with case when R is built from source
## (and thus is at /usr/local/bin/R), because RStudio doesn't obey
## path if a user apt-get installs a package
R_BIN=$(which R)
R_BIN="$(which R)"
echo "rsession-which-r=${R_BIN}" >/etc/rstudio/rserver.conf
## use more robust file locking to avoid errors when using shared volumes:
echo "lock-type=advisory" >/etc/rstudio/file-locks
Expand Down
26 changes: 1 addition & 25 deletions tests/rocker_scripts/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"rocker/r-ver"
],
"tag": [
"4.0.0",
"4.3.0",
"latest"
],
"script_name": [
Expand All @@ -23,12 +23,6 @@
"none"
],
"include": [
{
"base_image": "rocker/r-ver",
"tag": "4.0.0",
"script_name": "install_rstudio.sh",
"script_arg": "1.3.959"
},
{
"base_image": "rocker/r-ver",
"tag": "devel",
Expand All @@ -53,30 +47,12 @@
"script_name": "install_quarto.sh",
"script_arg": "prerelease"
},
{
"base_image": "rocker/r-ver",
"tag": "4.0.5",
"script_name": "install_cuda-11.1.sh",
"script_arg": "none"
},
{
"base_image": "rocker/r-ver",
"tag": "4.0.4",
"script_name": "install_tensorflow.sh",
"script_arg": "none"
},
{
"base_image": "rocker/cuda",
"tag": "latest",
"script_name": "install_verse.sh",
"script_arg": "none"
},
{
"base_image": "rocker/cuda",
"tag": "cuda11.1",
"script_name": "config_R_cuda.sh",
"script_arg": "none"
},
{
"base_image": "debian",
"tag": "stable-slim",
Expand Down

0 comments on commit 634deea

Please sign in to comment.