This is an automated email from the ASF dual-hosted git repository.

ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new ac282632e35f [SPARK-55391][PYTHON][INFRA] Upgrade Python 3.13 test 
image to Ubuntu 24.04
ac282632e35f is described below

commit ac282632e35f3259a38a493408a8f8307771a8d2
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Sat Feb 7 16:20:22 2026 +0800

    [SPARK-55391][PYTHON][INFRA] Upgrade Python 3.13 test image to Ubuntu 24.04
    
    ### What changes were proposed in this pull request?
    Upgrade Python 3.13 test image to Ubuntu 24.04
    
    ### Why are the changes needed?
    to upgrade the OS to a newer version
    
    ### Does this PR introduce _any_ user-facing change?
    No, infra-only
    
    ### How was this patch tested?
    PR builder with:
    
    ```
    default: '{"PYSPARK_IMAGE_TO_TEST": "python-313", "PYTHON_TO_TEST": 
"python3.13"}'
    ```
    
    
https://github.com/zhengruifeng/spark/actions/runs/21749663053/job/62744577457
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No
    
    Closes #54173 from zhengruifeng/ubuntu_24_py_13.
    
    Authored-by: Ruifeng Zheng <[email protected]>
    Signed-off-by: Ruifeng Zheng <[email protected]>
---
 dev/spark-test-image/python-313/Dockerfile | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/dev/spark-test-image/python-313/Dockerfile 
b/dev/spark-test-image/python-313/Dockerfile
index a7cb727c29be..dc9383da152d 100644
--- a/dev/spark-test-image/python-313/Dockerfile
+++ b/dev/spark-test-image/python-313/Dockerfile
@@ -15,16 +15,16 @@
 # limitations under the License.
 #
 
-# Image for building and testing Spark branches. Based on Ubuntu 22.04.
+# Image for building and testing Spark branches. Based on Ubuntu 24.04.
 # See also in https://hub.docker.com/_/ubuntu
-FROM ubuntu:jammy-20240911.1
+FROM ubuntu:noble
 LABEL org.opencontainers.image.authors="Apache Spark project 
<[email protected]>"
 LABEL org.opencontainers.image.licenses="Apache-2.0"
 LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image For PySpark 
with Python 3.13"
 # Overwrite this label to avoid exposing the underlying Ubuntu OS version label
 LABEL org.opencontainers.image.version=""
 
-ENV FULL_REFRESH_DATE=20260203
+ENV FULL_REFRESH_DATE=20260206
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV DEBCONF_NONINTERACTIVE_SEEN=true
@@ -54,14 +54,17 @@ RUN apt-get update && apt-get install -y \
     && apt-get clean \
     && rm -rf /var/lib/apt/lists/*
 
+# Setup virtual environment
+ENV VIRTUAL_ENV=/opt/spark-venv
+RUN python3.13 -m venv --without-pip $VIRTUAL_ENV
+ENV PATH="$VIRTUAL_ENV/bin:$PATH"
+
+# Install Python 3.13 packages
+RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13
 
 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 pystack>=1.6.0 psutil"
-# Python deps for Spark Connect
 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"
 
-# Install Python 3.13 packages
-RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13
-RUN python3.13 -m pip install --ignore-installed 'blinker>=1.6.2' # mlflow 
needs this
 RUN python3.13 -m pip install $BASIC_PIP_PKGS unittest-xml-reporting 
$CONNECT_PIP_PKGS lxml && \
     python3.13 -m pip install torch torchvision --index-url 
https://download.pytorch.org/whl/cpu && \
     python3.13 -m pip install torcheval && \


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to