Skip to content

Commit bcac2d5

Browse files
authored
Merge pull request #783 from rstudio/dev
Merge Workbench image fixes
2 parents ef6e52a + c69133c commit bcac2d5

File tree

10 files changed

+36
-36
lines changed

10 files changed

+36
-36
lines changed

Justfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ preview-plan branch="$(git branch --show-current)":
8787

8888
# just test workbench
8989
test target="default" file="docker-bake.hcl":
90-
python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --target "{{target}}" --file "{{file}}"
90+
GIT_SHA=$(git rev-parse --short HEAD) \
91+
python3 {{justfile_directory()}}/tools/test_bake_artifacts.py --target "{{target}}" --file "{{file}}"
9192

9293
# just preview-test connect dev
9394
preview-test target="default" branch="$(git branch --show-current)":

docker-bake.hcl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ function get_tags {
9696
variable BASE_BUILD_MATRIX {
9797
default = {
9898
builds = [
99-
{os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"},
100-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"},
10199
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"},
102100
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
103101
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
@@ -183,15 +181,15 @@ variable WORKBENCH_BUILD_MATRIX {
183181
variable WORKBENCH_GOOGLE_CLOUD_WORKSTATION_BUILD_MATRIX {
184182
default = {
185183
builds = [
186-
{os = "ubuntu2004", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.7", py_alternate = "3.10.13"},
184+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
187185
]
188186
}
189187
}
190188

191189
variable WORKBENCH_MICROSOFT_AZURE_ML_BUILD_MATRIX {
192190
default = {
193191
builds = [
194-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"},
192+
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"},
195193
]
196194
}
197195
}
@@ -479,7 +477,7 @@ target "workbench-for-google-cloud-workstations" {
479477
DRIVERS_VERSION = get_drivers_version(builds.os)
480478
RSW_VERSION = WORKBENCH_VERSION
481479
RSW_NAME = "rstudio-workbench"
482-
RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/focal/amd64"
480+
RSW_DOWNLOAD_URL = "https://download2.rstudio.org/server/jammy/amd64"
483481
}
484482
}
485483

docker-bake.preview.hcl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ function get_tags {
114114
variable BASE_BUILD_MATRIX {
115115
default = {
116116
builds = [
117-
{os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
118-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
119117
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
120118
]
121119
}

product/base/scripts/ubuntu/install_python.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ install_python() {
9494
apt-get install $APT_ARGS "/tmp/python-${PYTHON_VERSION}.deb"
9595
rm "/tmp/python-${PYTHON_VERSION}.deb"
9696
# Upgrade pip and setuptools to latest version
97+
$PYTHON_BIN -m ensurepip --upgrade
9798
$PYTHON_BIN -m pip install -U setuptools
9899
$PYTHON_BIN -m pip install -U pip
99100
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
RSW_VERSION=2024.04.1+748.pro2
22
RSW_TAG_VERSION=2024.04.1-748.pro2
3-
RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64
3+
RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64
44
RSW_NAME=rstudio-workbench
5-
PYTHON_VERSION=3.10.13
6-
PYTHON_VERSION_ALT=3.9.18
7-
PYTHON_VERSION_JUPYTER=3.10.13
8-
R_VERSION=4.2.3
9-
R_VERSION_ALT=4.1.3
5+
PYTHON_VERSION=3.11.9
6+
PYTHON_VERSION_ALT=3.10.14
7+
PYTHON_VERSION_JUPYTER=3.10.14
8+
R_VERSION=4.4.0
9+
R_VERSION_ALT=4.3.3
1010
DRIVERS_VERSION=2023.05.0
1111
QUARTO_VERSION=1.3.340
1212
IMAGE_REGISTRY_NAME=us-central1-docker.pkg.dev/posit-images/cloud-workstations/workbench

workbench-for-google-cloud-workstations/Dockerfile.ubuntu2004 renamed to workbench-for-google-cloud-workstations/Dockerfile.ubuntu2204

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:last-ubuntu2004 as build
1+
FROM us-central1-docker.pkg.dev/cloud-workstations-images/predefined/base:latest as build
22

33
### ARG declarations ###
44
ARG DEBIAN_FRONTEND=noninteractive
5-
ARG R_VERSION=4.2.3
6-
ARG R_VERSION_ALT=4.1.3
7-
ARG PYTHON_VERSION=3.11.7
8-
ARG PYTHON_VERSION_ALT=3.10.13
9-
ARG PYTHON_VERSION_JUPYTER=3.10.13
5+
ARG R_VERSION=4.4.0
6+
ARG R_VERSION_ALT=4.3.3
7+
ARG PYTHON_VERSION=3.11.9
8+
ARG PYTHON_VERSION_ALT=3.10.14
9+
ARG PYTHON_VERSION_JUPYTER=3.10.14
1010
ARG JUPYTERLAB_VERSION=3.6.7
1111
ARG DRIVERS_VERSION=2023.05.0
1212
ARG RSW_VERSION=2024.04.1+748.pro2
1313
ARG RSW_NAME=rstudio-workbench
14-
ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/focal/amd64
14+
ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/jammy/amd64
1515
ARG SCRIPTS_DIR=/opt/positscripts
1616

1717
ENV STARTUP_DEBUG_MODE 0
@@ -40,8 +40,8 @@ RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyri
4040
&& rm -rf /var/lib/apt/lists/*
4141

4242
### Install R versions ###
43-
RUN curl -O https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION}_1_amd64.deb \
44-
&& curl -O https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION_ALT}_1_amd64.deb \
43+
RUN curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION}_1_amd64.deb \
44+
&& curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION_ALT}_1_amd64.deb \
4545
&& apt-get update \
4646
&& apt-get install -yq --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \
4747
&& apt-get install -yq --no-install-recommends ./r-${R_VERSION_ALT}_1_amd64.deb \
@@ -52,17 +52,19 @@ RUN curl -O https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION}_1_amd64.de
5252
&& rm -rf /var/lib/apt/lists/*
5353

5454
### Install Python versions ###
55-
RUN curl -O https://cdn.rstudio.com/python/ubuntu-2004/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \
56-
&& curl -O https://cdn.rstudio.com/python/ubuntu-2004/pkgs/python-${PYTHON_VERSION_ALT}_1_amd64.deb \
55+
RUN curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \
56+
&& curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-${PYTHON_VERSION_ALT}_1_amd64.deb \
5757
&& apt-get update \
5858
&& apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION}_1_amd64.deb \
5959
&& apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION_ALT}_1_amd64.deb \
6060
&& rm -rf python-${PYTHON_VERSION}_1_amd64.deb \
6161
&& rm -rf python-${PYTHON_VERSION_ALT}_1_amd64.deb \
62+
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m ensurepip --upgrade \
6263
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install 'virtualenv<20' \
6364
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools \
6465
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade pip \
6566
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip cache purge \
67+
&& /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m ensurepip --upgrade \
6668
&& /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install 'virtualenv<20' \
6769
&& /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade setuptools \
6870
&& /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade pip \
@@ -95,7 +97,7 @@ RUN apt-get update \
9597
&& rm -f ./rstudio-drivers_${DRIVERS_VERSION}_amd64.deb \
9698
&& rm -rf /var/lib/apt/lists/* \
9799
&& cp /opt/rstudio-drivers/odbcinst.ini.sample /etc/odbcinst.ini \
98-
&& /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/focal/latest")'
100+
&& /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/jammy/latest")'
99101

100102
### Install Workbench ###
101103
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -117,7 +119,7 @@ RUN curl -o rstudio-workbench.deb "${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION
117119
# TODO(ianpittwood): Replace monitor download with $RSW_VERSION after upgrading to 2023.06.0
118120
RUN mkdir -p /opt/rstudio-license/ \
119121
&& mkdir -p /var/lib/rstudio-workbench \
120-
&& curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/focal/rsp-monitor-workbench-gcpw-amd64-2023.06.0-419.pro1.tar.gz" | \
122+
&& curl -sL "https://s3.amazonaws.com/rstudio-ide-build/monitor/jammy/rsp-monitor-workbench-gcpw-amd64-2023.06.0-419.pro1.tar.gz" | \
121123
tar xzvf - --strip 2 -C /opt/rstudio-license/ \
122124
&& chmod 0755 /opt/rstudio-license/license-manager \
123125
&& mv /opt/rstudio-license/license-manager /opt/rstudio-license/license-manager-orig \

workbench-for-google-cloud-workstations/conf/launcher-env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Environment: LANG=en_US.UTF-8
33
LANGUAGE=en_US:en
44
LC_ALL=en_US.UTF-8
55
JobType: any
6-
Environment: PATH=/opt/python/3.9.17/bin:$PATH
6+
Environment: PATH=/opt/python/3.10.14/bin:$PATH
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
CRAN=https://packagemanager.posit.co/cran/__linux__/focal/latest
2-
RSPM=https://packagemanager.posit.co/cran/__linux__/focal/latest
1+
CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/latest
2+
RSPM=https://packagemanager.posit.co/cran/__linux__/jammy/latest

workbench-for-google-cloud-workstations/test/goss.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
user:
22
rstudio-server:
33
exists: true
4-
uid: 999
5-
gid: 998
64

75
group:
86
rstudio-server:
97
exists: true
10-
gid: 998
118

129
package:
1310
rstudio-server:
@@ -155,11 +152,11 @@ file:
155152

156153
command:
157154
# Check OS release version (early heads up in case the base image is modified)
158-
Check OS version is "focal":
155+
Check OS version is "jammy":
159156
exec: "lsb_release -cs"
160157
exit-status: 0
161158
stdout: [
162-
"focal"
159+
"jammy"
163160
]
164161
Test Workbench Monitor rstudio-server.log creation:
165162
exec: su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log'

workbench/startup.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ else
6666
if [ -z "$RSW_TESTUSER" ]; then
6767
echo "Empty 'RSW_TESTUSER' variables, not creating test user";
6868
else
69-
useradd -m -s /bin/bash -N -u $RSW_TESTUSER_UID $RSW_TESTUSER
69+
if [ -z "$RSW_TESTUSER_UID" ]; then
70+
RSW_TESTUSER_UID=10000
71+
fi
72+
useradd -m -s /bin/bash -u $RSW_TESTUSER_UID -U $RSW_TESTUSER
7073
echo "$RSW_TESTUSER:$RSW_TESTUSER_PASSWD" | sudo chpasswd
7174
fi
7275
fi

0 commit comments

Comments
 (0)