|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +# Image for building and testing Spark branches. Based on Ubuntu 22.04. |
| 19 | +# See also in https://hub.docker.com/_/ubuntu |
| 20 | +FROM ubuntu:jammy-20240911.1 |
| 21 | +LABEL org.opencontainers.image.authors= "Apache Spark project <[email protected]>" |
| 22 | +LABEL org.opencontainers.image.licenses="Apache-2.0" |
| 23 | +LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image For PySpark with Python 3.14" |
| 24 | +# Overwrite this label to avoid exposing the underlying Ubuntu OS version label |
| 25 | +LABEL org.opencontainers.image.version="" |
| 26 | + |
| 27 | +ENV FULL_REFRESH_DATE=20251007 |
| 28 | + |
| 29 | +ENV DEBIAN_FRONTEND=noninteractive |
| 30 | +ENV DEBCONF_NONINTERACTIVE_SEEN=true |
| 31 | + |
| 32 | +RUN apt-get update && apt-get install -y \ |
| 33 | + build-essential \ |
| 34 | + ca-certificates \ |
| 35 | + curl \ |
| 36 | + gfortran \ |
| 37 | + git \ |
| 38 | + gnupg \ |
| 39 | + libcurl4-openssl-dev \ |
| 40 | + libfontconfig1-dev \ |
| 41 | + libfreetype6-dev \ |
| 42 | + libfribidi-dev \ |
| 43 | + libgit2-dev \ |
| 44 | + libharfbuzz-dev \ |
| 45 | + libjpeg-dev \ |
| 46 | + liblapack-dev \ |
| 47 | + libopenblas-dev \ |
| 48 | + libpng-dev \ |
| 49 | + libpython3-dev \ |
| 50 | + libssl-dev \ |
| 51 | + libtiff5-dev \ |
| 52 | + libxml2-dev \ |
| 53 | + openjdk-17-jdk-headless \ |
| 54 | + pkg-config \ |
| 55 | + qpdf \ |
| 56 | + tzdata \ |
| 57 | + software-properties-common \ |
| 58 | + wget \ |
| 59 | + zlib1g-dev |
| 60 | + |
| 61 | +# Install Python 3.14 |
| 62 | +RUN add-apt-repository ppa:deadsnakes/ppa |
| 63 | +RUN apt-get update && apt-get install -y \ |
| 64 | + python3.14 \ |
| 65 | + && apt-get autoremove --purge -y \ |
| 66 | + && apt-get clean \ |
| 67 | + && rm -rf /var/lib/apt/lists/* |
| 68 | + |
| 69 | + |
| 70 | +ARG BASIC_PIP_PKGS="numpy six==1.16.0 pandas==2.3.3 scipy plotly<6.0.0 coverage matplotlib openpyxl memory-profiler>=0.61.0 scikit-learn>=1.3.2" |
| 71 | +# Python deps for Spark Connect |
| 72 | +ARG CONNECT_PIP_PKGS="grpcio==1.75.1 grpcio-status==1.71.2 protobuf==5.29.5 googleapis-common-protos==1.65.0 graphviz==0.20.3" |
| 73 | + |
| 74 | +# Install Python 3.14 packages |
| 75 | +RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.14 |
| 76 | +RUN python3.14 -m pip install --ignore-installed blinker>=1.6.2 # mlflow needs this |
| 77 | +RUN python3.14 -m pip install $BASIC_PIP_PKGS unittest-xml-reporting $CONNECT_PIP_PKGS lxml && \ |
| 78 | + python3.14 -m pip install torcheval && \ |
| 79 | + python3.14 -m pip cache purge |
0 commit comments