Skip to content

Commit e72ddac

Browse files
zhengruifengdongjoon-hyun
authored andcommitted
[SPARK-55415][PYTHON][INFRA] Upgrade PyPy images to Ubuntu 24.04
### What changes were proposed in this pull request? Upgrade PyPy images to Ubuntu 24.04 ### Why are the changes needed? to test with newer os version ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? PR builder with ``` default: '{"PYSPARK_IMAGE_TO_TEST": "pypy-310", "PYTHON_TO_TEST": "pypy3"}' ``` https://github.com/zhengruifeng/spark/actions/runs/21777603039/job/62837391685 passed ``` default: '{"PYSPARK_IMAGE_TO_TEST": "pypy-311", "PYTHON_TO_TEST": "pypy3"}' ``` https://github.com/zhengruifeng/spark/actions/runs/21780231635/job/62844418209 failed as normal ### Was this patch authored or co-authored using generative AI tooling? no Closes #54202 from zhengruifeng/u24_pypy. Authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent d1dbcda commit e72ddac

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

dev/spark-test-image/pypy-310/Dockerfile

Lines changed: 11 additions & 4 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 <dev@spark.apache.org>"
2222
LABEL org.opencontainers.image.licenses="Apache-2.0"
2323
LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image For PySpark with PyPy 3.10"
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=20260202
27+
ENV FULL_REFRESH_DATE=20260207
2828

2929
ENV DEBIAN_FRONTEND=noninteractive
3030
ENV DEBCONF_NONINTERACTIVE_SEEN=true
@@ -51,10 +51,17 @@ RUN apt-get update && apt-get install -y \
5151
&& rm -rf /var/lib/apt/lists/*
5252

5353

54-
RUN add-apt-repository ppa:pypy/ppa
54+
# Install PyPy 3.10
5555
RUN mkdir -p /usr/local/pypy/pypy3.10 && \
5656
curl -sqL https://downloads.python.org/pypy/pypy3.10-v7.3.17-linux64.tar.bz2 | tar xjf - -C /usr/local/pypy/pypy3.10 --strip-components=1 && \
5757
ln -sf /usr/local/pypy/pypy3.10/bin/pypy /usr/local/bin/pypy3.10 && \
5858
ln -sf /usr/local/pypy/pypy3.10/bin/pypy /usr/local/bin/pypy3
59+
60+
# Setup virtual environment
61+
ENV VIRTUAL_ENV=/opt/spark-venv
62+
RUN pypy3 -m venv --without-pip $VIRTUAL_ENV
63+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
64+
65+
# Install PyPy 3.10 packages
5966
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | pypy3
6067
RUN pypy3 -m pip install numpy 'six==1.16.0' 'pandas==2.3.3' scipy coverage matplotlib lxml

dev/spark-test-image/pypy-311/Dockerfile

Lines changed: 11 additions & 4 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 <dev@spark.apache.org>"
2222
LABEL org.opencontainers.image.licenses="Apache-2.0"
2323
LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image For PySpark with PyPy 3.11"
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=20260202
27+
ENV FULL_REFRESH_DATE=20260207
2828

2929
ENV DEBIAN_FRONTEND=noninteractive
3030
ENV DEBCONF_NONINTERACTIVE_SEEN=true
@@ -51,10 +51,17 @@ RUN apt-get update && apt-get install -y \
5151
&& rm -rf /var/lib/apt/lists/*
5252

5353

54-
RUN add-apt-repository ppa:pypy/ppa
54+
# Install PyPy 3.11
5555
RUN mkdir -p /usr/local/pypy/pypy3.11 && \
5656
curl -sqL https://downloads.python.org/pypy/pypy3.11-v7.3.20-linux64.tar.bz2 | tar xjf - -C /usr/local/pypy/pypy3.11 --strip-components=1 && \
5757
ln -sf /usr/local/pypy/pypy3.11/bin/pypy /usr/local/bin/pypy3.11 && \
5858
ln -sf /usr/local/pypy/pypy3.11/bin/pypy /usr/local/bin/pypy3
59+
60+
# Setup virtual environment
61+
ENV VIRTUAL_ENV=/opt/spark-venv
62+
RUN pypy3 -m venv --without-pip $VIRTUAL_ENV
63+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
64+
65+
# Install PyPy 3.11 packages
5966
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | pypy3
6067
RUN pypy3 -m pip install numpy 'six==1.16.0' 'pandas==2.3.3' scipy coverage matplotlib lxml

0 commit comments

Comments
 (0)