forked from NVIDIA/spark-rapids
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-blossom.integration.ubuntu
78 lines (68 loc) · 3.17 KB
/
Dockerfile-blossom.integration.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
78
#
# 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
# UBUNTU_VER=20.04 or 22.04
# CUDF_VER=<cudf-py version>
###
ARG CUDA_VER=11.8.0
ARG UBUNTU_VER=20.04
FROM nvidia/cuda:${CUDA_VER}-runtime-ubuntu${UBUNTU_VER}
ARG CUDA_VER
ARG CUDF_VER
ARG UBUNTU_VER
# https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771
RUN UB_VER=$(echo ${UBUNTU_VER} | tr -d '.') && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${UB_VER}/x86_64/3bf863cc.pub || true
# Install jdk-8, jdk-11, jdk-17, docker image
RUN apt-get update -y && \
apt-get install -y software-properties-common rsync zip unzip
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update -y && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y \
openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk tzdata git wget
# Install maven 3.8+ to be compatible with JDK17 on Ubuntu
ARG MAVEN_VERSION=3.8.4
RUN wget https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \
tar xf apache-maven-$MAVEN_VERSION-bin.tar.gz -C /usr/local/ && \
rm -rf apache-maven-$MAVEN_VERSION-bin.tar.gz && \
ln -sf /usr/local/apache-maven-$MAVEN_VERSION/bin/mvn /usr/bin/mvn
# Set default jdk as 1.8.0
RUN update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm -f ~/miniconda.sh
ENV PATH="/opt/conda/bin:$MAVEN_HOME/bin:${PATH}"
RUN conda init
# TODO: re-enable mamba solver after https://github.com/NVIDIA/spark-rapids/issues/9393
# conda config --set solver libmamba
# 'pyarrow' and 'pandas' will be installed as the dependencies of cudf below
RUN export CUDA_VER=`echo ${CUDA_VER} | cut -d '.' -f 1,2` && \
conda install -y -c rapidsai -c rapidsai-nightly -c nvidia -c conda-forge -c defaults cudf=${CUDF_VER} python=3.10 cuda-version=${CUDA_VER} && \
conda install -y spacy && python -m spacy download en_core_web_sm && \
conda install -y -c anaconda pytest requests && \
conda install -y -c conda-forge sre_yield && \
conda clean -ay
# install pytest plugins for xdist parallel run
RUN python -m pip install findspark pytest-xdist pytest-order fastparquet==2024.5.0
RUN apt install -y inetutils-ping expect
# install locale and generate UTF-8, but don't set it as default, the test cases should specify it somehow
RUN apt-get install -y locales
RUN locale-gen en_US.UTF-8