Skip to content

Commit 13e16b2

Browse files
zhengruifengrpnkv
authored andcommitted
[SPARK-55412][PYTHON][INFRA] Upgrade Python 3.14 no gil test image to Ubuntu 24.04
### What changes were proposed in this pull request? Upgrade Python 3.14 no gil test image to Ubuntu 24.04 ### Why are the changes needed? to test against newer os ### Does this PR introduce _any_ user-facing change? infra-only ### How was this patch tested? PR builder with ``` default: '{"PYSPARK_IMAGE_TO_TEST": "python-314-nogil", "PYTHON_TO_TEST": "python3.14t", "PYTHON_GIL": "0"}' ``` https://github.com/zhengruifeng/spark/actions/runs/21777984261/job/62837799728 ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#54199 from zhengruifeng/u24_314t. Authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
1 parent 8104f0b commit 13e16b2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dev/spark-test-image/python-314-nogil/Dockerfile

Lines changed: 8 additions & 8 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 Python 3.13 (no GIL)"
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=20260203
27+
ENV FULL_REFRESH_DATE=20260206
2828

2929
ENV DEBIAN_FRONTEND=noninteractive
3030
ENV DEBCONF_NONINTERACTIVE_SEEN=true
@@ -54,15 +54,15 @@ RUN apt-get update && apt-get install -y \
5454
&& apt-get clean \
5555
&& rm -rf /var/lib/apt/lists/*
5656

57-
58-
ARG BASIC_PIP_PKGS="numpy pyarrow>=22.0.0 six==1.16.0 pandas==2.3.3 scipy plotly<6.0.0 mlflow>=2.8.1 coverage matplotlib openpyxl memory-profiler>=0.61.0 scikit-learn>=1.3.2"
59-
ARG CONNECT_PIP_PKGS="grpcio==1.76.0 grpcio-status==1.76.0 protobuf==6.33.5 googleapis-common-protos==1.71.0 zstandard==0.25.0 graphviz==0.20.3"
60-
57+
# Setup virtual environment
58+
ENV VIRTUAL_ENV=/opt/spark-venv
59+
RUN python3.14t -m venv --without-pip $VIRTUAL_ENV
60+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
6161

6262
# Install Python 3.14 packages
6363
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.14t
64+
6465
# TODO: Add BASIC_PIP_PKGS and CONNECT_PIP_PKGS when it supports Python 3.14 free threaded
6566
# TODO: Add lxml, grpcio, grpcio-status back when they support Python 3.14 free threaded
66-
RUN python3.14t -m pip install --ignore-installed 'blinker>=1.6.2' # mlflow needs this
6767
RUN python3.14t -m pip install 'numpy>=2.1' 'pyarrow>=19.0.0' 'six==1.16.0' 'pandas==2.3.3' 'pystack>=1.6.0' scipy coverage matplotlib openpyxl jinja2 psutil && \
6868
python3.14t -m pip cache purge

0 commit comments

Comments
 (0)