forked from NVIDIA/spark-rapids
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-blossom.ubuntu
77 lines (68 loc) · 2.99 KB
/
Dockerfile-blossom.ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# Copyright (c) 2020-2024, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###
#
# Build the image for rapids-plugin development environment
#
# Arguments:
# CUDA_VER=[11.X.Y,12.X.Y]
# UBUNTU_VER=[20.04,22.0.4]
# UCX_VER=1.16.0
# TARGETPLATFORM=[linux/amd64,linux/arm64]
# ARCH=[amd64,arm64]
# UCX_ARCH=[x86_64,aarch64]
###
ARG CUDA_VER=11.8.0
ARG UBUNTU_VER=20.04
ARG UCX_VER=1.16.0
ARG TARGETPLATFORM=linux/amd64
# multi-platform build with: docker buildx build --platform linux/arm64,linux/amd64 <ARGS> on either amd64 or arm64 host
# check available official arm-based docker images at https://hub.docker.com/r/nvidia/cuda/tags (OS/ARCH)
FROM --platform=$TARGETPLATFORM nvidia/cuda:${CUDA_VER}-runtime-ubuntu${UBUNTU_VER}
ARG CUDA_VER
ARG UBUNTU_VER
ARG UCX_VER
ARG ARCH=amd64
ARG UCX_ARCH=x86_64
# Install jdk-8, jdk-11, jdk-17, maven, docker image
RUN apt-get update -y && \
apt-get install -y software-properties-common rsync
# libnuma1 and libgomp1 are required by ucx packaging
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update -y && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y maven \
openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk python3.9 python3.9-distutils python3-setuptools tzdata git zip unzip wget \
inetutils-ping expect wget libnuma1 libgomp1 locales
# apt python3-pip would install pip for OS default python3 version only
# like for ubuntu 18.04, it would only install pip for python3.6
# so we install pip for specific python version explicitly
RUN wget https://bootstrap.pypa.io/get-pip.py && python3.9 get-pip.py
# Set default jdk as 1.8.0
RUN update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-${ARCH}
RUN ln -sfn /usr/bin/python3.9 /usr/bin/python
RUN ln -sfn /usr/bin/python3.9 /usr/bin/python3
RUN python -m pip install pytest sre_yield requests pandas pyarrow findspark pytest-xdist pre-commit pytest-order fastparquet==2024.5.0
RUN UCX_CUDA_VER=`echo ${CUDA_VER} | cut -d '.' -f1` && \
mkdir -p /tmp/ucx && \
cd /tmp/ucx && \
wget https://github.com/openucx/ucx/releases/download/v${UCX_VER}/ucx-${UCX_VER}-ubuntu${UBUNTU_VER}-mofed5-cuda${UCX_CUDA_VER}-${UCX_ARCH}.tar.bz2 && \
tar -xvf *.bz2 && \
dpkg -i *.deb && \
rm -rf /tmp/ucx
# export JAVA_HOME for mvn option 'source-javadoc'
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-${ARCH}
# install locale and generate UTF-8, but don't set it as default, the test cases should specify it somehow
RUN locale-gen en_US.UTF-8