[CI] Fix cuDF install; merge 'gpu' and 'cudf' test suite (#5814)
This commit is contained in:
parent
76d1b69664
commit
4e1fba261d
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@ -325,25 +325,12 @@ def TestPythonGPU(args) {
|
|||||||
sh """
|
sh """
|
||||||
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh mgpu
|
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh mgpu
|
||||||
"""
|
"""
|
||||||
if (args.cuda_version != '9.0') {
|
|
||||||
echo "Running tests with cuDF..."
|
|
||||||
sh """
|
|
||||||
${dockerRun} cudf ${docker_binary} ${docker_args} tests/ci_build/test_python.sh mgpu-cudf
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
echo "Using a single GPU"
|
echo "Using a single GPU"
|
||||||
sh """
|
sh """
|
||||||
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh gpu
|
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh gpu
|
||||||
"""
|
"""
|
||||||
if (args.cuda_version != '9.0') {
|
|
||||||
echo "Running tests with cuDF..."
|
|
||||||
sh """
|
|
||||||
${dockerRun} cudf ${docker_binary} ${docker_args} tests/ci_build/test_python.sh cudf
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// For CUDA 10.0 target, run cuDF tests too
|
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,37 +0,0 @@
|
|||||||
ARG CUDA_VERSION
|
|
||||||
FROM nvidia/cuda:$CUDA_VERSION-runtime-ubuntu16.04
|
|
||||||
|
|
||||||
# Environment
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
SHELL ["/bin/bash", "-c"] # Use Bash as shell
|
|
||||||
|
|
||||||
# Install all basic requirements
|
|
||||||
RUN \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y wget unzip bzip2 libgomp1 build-essential && \
|
|
||||||
# Python
|
|
||||||
wget -O Miniconda3.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
|
||||||
bash Miniconda3.sh -b -p /opt/python
|
|
||||||
|
|
||||||
ENV PATH=/opt/python/bin:$PATH
|
|
||||||
|
|
||||||
# Create new Conda environment with cuDF, Dask, and cuPy
|
|
||||||
RUN \
|
|
||||||
conda create -n cudf_test -c rapidsai -c nvidia -c conda-forge -c defaults \
|
|
||||||
python=3.7 cudf cudatoolkit=$CUDA_VERSION dask dask-cuda dask-cudf cupy \
|
|
||||||
numpy pytest scipy scikit-learn pandas matplotlib wheel python-kubernetes urllib3 graphviz
|
|
||||||
|
|
||||||
ENV GOSU_VERSION 1.10
|
|
||||||
|
|
||||||
# Install lightweight sudo (not bound to TTY)
|
|
||||||
RUN set -ex; \
|
|
||||||
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \
|
|
||||||
chmod +x /usr/local/bin/gosu && \
|
|
||||||
gosu nobody true
|
|
||||||
|
|
||||||
# Default entry-point to use if running locally
|
|
||||||
# It will preserve attributes of created files
|
|
||||||
COPY entrypoint.sh /scripts/
|
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
ENTRYPOINT ["/scripts/entrypoint.sh"]
|
|
||||||
@ -3,6 +3,7 @@ FROM nvidia/cuda:$CUDA_VERSION-runtime-ubuntu16.04
|
|||||||
|
|
||||||
# Environment
|
# Environment
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
SHELL ["/bin/bash", "-c"] # Use Bash as shell
|
||||||
|
|
||||||
# Install all basic requirements
|
# Install all basic requirements
|
||||||
RUN \
|
RUN \
|
||||||
@ -14,11 +15,11 @@ RUN \
|
|||||||
|
|
||||||
ENV PATH=/opt/python/bin:$PATH
|
ENV PATH=/opt/python/bin:$PATH
|
||||||
|
|
||||||
# Install Python packages
|
# Create new Conda environment with cuDF, Dask, and cuPy
|
||||||
RUN \
|
RUN \
|
||||||
conda create -n gpu_test -c rapidsai -c nvidia -c conda-forge -c defaults \
|
conda create -n gpu_test -c rapidsai -c nvidia -c conda-forge -c defaults \
|
||||||
python=3.7 dask dask-cuda numpy pytest scipy scikit-learn pandas \
|
python=3.7 cudf=0.14 cudatoolkit=$CUDA_VERSION dask dask-cuda dask-cudf cupy \
|
||||||
matplotlib wheel python-kubernetes urllib3 graphviz
|
numpy pytest scipy scikit-learn pandas matplotlib wheel python-kubernetes urllib3 graphviz
|
||||||
|
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|
||||||
|
|||||||
@ -44,20 +44,6 @@ case "$suite" in
|
|||||||
cd -
|
cd -
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cudf)
|
|
||||||
source activate cudf_test
|
|
||||||
install_xgboost
|
|
||||||
pytest -v -s -rxXs --fulltrace -m "not mgpu" \
|
|
||||||
tests/python-gpu/test_from_cudf.py tests/python-gpu/test_from_cupy.py \
|
|
||||||
tests/python-gpu/test_gpu_prediction.py
|
|
||||||
;;
|
|
||||||
|
|
||||||
mgpu-cudf)
|
|
||||||
source activate cudf_test
|
|
||||||
install_xgboost
|
|
||||||
pytest -v -s -rxXs --fulltrace -m "mgpu" tests/python-gpu/test_gpu_with_dask.py
|
|
||||||
;;
|
|
||||||
|
|
||||||
cpu)
|
cpu)
|
||||||
install_xgboost
|
install_xgboost
|
||||||
pytest -v -s --fulltrace tests/python
|
pytest -v -s --fulltrace tests/python
|
||||||
@ -72,7 +58,7 @@ case "$suite" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {gpu|mgpu|cudf|cpu|cpu-py35}"
|
echo "Usage: $0 {gpu|mgpu|cpu|cpu-py35}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user