Skip to content

Commit 1454479

Browse files
zhengruifengrpnkv
authored andcommitted
[SPARK-55436][INFRA] Upgrade lint and doc test images to Ubuntu 24.04
### What changes were proposed in this pull request? Upgrade lint and doc test images to Ubuntu 24.04 ### Why are the changes needed? to test against newer os version ### Does this PR introduce _any_ user-facing change? no, infra-only ### How was this patch tested? ci, the PR builder should cover the change ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#54220 from zhengruifeng/u24_doc_lint. Authored-by: Ruifeng Zheng <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent d4b1650 commit 1454479

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

dev/spark-test-image/docs/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
# limitations under the License.
1616
#
1717

18-
# Image for building and testing Spark branches. Based on Ubuntu 22.04.
18+
# Image for building and testing Spark branches. Based on Ubuntu 24.04.
1919
# See also in https://hub.docker.com/_/ubuntu
20-
FROM ubuntu:jammy-20240911.1
20+
FROM ubuntu:noble
2121
LABEL org.opencontainers.image.authors="Apache Spark project <[email protected]>"
2222
LABEL org.opencontainers.image.licenses="Apache-2.0"
2323
LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image for Documentation"
2424
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label
2525
LABEL org.opencontainers.image.version=""
2626

27-
ENV FULL_REFRESH_DATE=20250616
27+
ENV FULL_REFRESH_DATE=20260208
2828

2929
ENV DEBIAN_FRONTEND=noninteractive
3030
ENV DEBCONF_NONINTERACTIVE_SEEN=true
@@ -63,9 +63,7 @@ RUN apt-get update && apt-get install -y \
6363
ruby-dev \
6464
software-properties-common \
6565
wget \
66-
zlib1g-dev \
67-
&& rm -rf /var/lib/apt/lists/*
68-
66+
zlib1g-dev
6967

7068
# See more in SPARK-39959, roxygen2 < 7.2.1
7169
RUN Rscript -e "install.packages(c('devtools', 'knitr', 'markdown', 'rmarkdown', 'testthat'), repos='https://cloud.r-project.org/')" && \
@@ -83,6 +81,12 @@ RUN apt-get update && apt-get install -y \
8381
&& apt-get autoremove --purge -y \
8482
&& apt-get clean \
8583
&& rm -rf /var/lib/apt/lists/*
84+
85+
# Setup virtual environment
86+
ENV VIRTUAL_ENV=/opt/spark-venv
87+
RUN python3.11 -m venv --without-pip $VIRTUAL_ENV
88+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
89+
8690
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
8791

8892
# Should unpin 'sphinxcontrib-*' after upgrading sphinx>5

dev/spark-test-image/lint/Dockerfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
# limitations under the License.
1616
#
1717

18-
# Image for building and testing Spark branches. Based on Ubuntu 22.04.
18+
# Image for building and testing Spark branches. Based on Ubuntu 24.04.
1919
# See also in https://hub.docker.com/_/ubuntu
20-
FROM ubuntu:jammy-20240911.1
20+
FROM ubuntu:noble
2121
LABEL org.opencontainers.image.authors="Apache Spark project <[email protected]>"
2222
LABEL org.opencontainers.image.licenses="Apache-2.0"
2323
LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image for Linter"
2424
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label
2525
LABEL org.opencontainers.image.version=""
2626

27-
ENV FULL_REFRESH_DATE=20260129
27+
ENV FULL_REFRESH_DATE=20260208
2828

2929
ENV DEBIAN_FRONTEND=noninteractive
3030
ENV DEBCONF_NONINTERACTIVE_SEEN=true
@@ -51,12 +51,15 @@ RUN apt-get update && apt-get install -y \
5151
nodejs \
5252
npm \
5353
pkg-config \
54+
python3.12 \
5455
qpdf \
5556
tzdata \
5657
r-base \
5758
software-properties-common \
5859
wget \
5960
zlib1g-dev \
61+
&& apt-get autoremove --purge -y \
62+
&& apt-get clean \
6063
&& rm -rf /var/lib/apt/lists/*
6164

6265
RUN Rscript -e "install.packages(c('devtools', 'knitr', 'markdown', 'rmarkdown', 'testthat'), repos='https://cloud.r-project.org/')" \
@@ -67,14 +70,10 @@ RUN Rscript -e "install.packages(c('devtools', 'knitr', 'markdown', 'rmarkdown',
6770
# See more in SPARK-39735
6871
ENV R_LIBS_SITE="/usr/local/lib/R/site-library:${R_LIBS_SITE}:/usr/lib/R/library"
6972

70-
# Install Python 3.12
71-
RUN add-apt-repository ppa:deadsnakes/ppa
72-
RUN apt-get update && apt-get install -y \
73-
python3.12 \
74-
&& apt-get autoremove --purge -y \
75-
&& apt-get clean \
76-
&& rm -rf /var/lib/apt/lists/*
77-
73+
# Setup virtual environment
74+
ENV VIRTUAL_ENV=/opt/spark-venv
75+
RUN python3.12 -m venv --without-pip $VIRTUAL_ENV
76+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
7877

7978
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
8079
RUN python3.12 -m pip install \

0 commit comments

Comments
 (0)