Skip to content

Commit 25a1698

Browse files
committed
[SPARK-46020][INFRA] Add Python 3.12 to Infra docker image
1 parent f1a3a97 commit 25a1698

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: dev/infra/Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,15 @@ RUN python3.11 -m pip install 'grpcio>=1.48,<1.57' 'grpcio-status>=1.48,<1.57' '
127127
RUN python3.11 -m pip install 'torch<=2.0.1' torchvision --index-url https://download.pytorch.org/whl/cpu
128128
RUN python3.11 -m pip install torcheval
129129
RUN python3.11 -m pip install deepspeed
130+
131+
# Install Python 3.12 at the last stage to avoid breaking the existing Python installations
132+
RUN add-apt-repository ppa:deadsnakes/ppa
133+
RUN apt-get update && apt-get install -y \
134+
python3.12 python3.12-distutils \
135+
&& rm -rf /var/lib/apt/lists/*
136+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
137+
RUN python3.12 -m pip install numpy 'pyarrow>=14.0.0' 'pandas<=2.1.3' scipy unittest-xml-reporting plotly>=4.8 'mlflow>=2.8.1' coverage matplotlib openpyxl 'memory-profiler==0.60.0' 'scikit-learn>=1.3.2'
138+
RUN python3.12 -m pip install 'grpcio>=1.48,<1.57' 'grpcio-status>=1.48,<1.57' 'protobuf==4.25.1' 'googleapis-common-protos==1.56.4'
139+
RUN python3.12 -m pip install 'torch<=2.0.1' torchvision --index-url https://download.pytorch.org/whl/cpu
140+
RUN python3.12 -m pip install torcheval
141+
RUN python3.12 -m pip install deepspeed

0 commit comments

Comments
 (0)