Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use conda to build python packages during GPU tests #517

Merged
merged 1 commit into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export HOME="$WORKSPACE"
cd "$WORKSPACE"
export GIT_DESCRIBE_TAG=`git describe --tags`
export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'`
unset GIT_DESCRIBE_TAG

################################################################################
# SETUP - Check environment
Expand All @@ -41,12 +42,6 @@ nvidia-smi
gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids
gpuci_mamba_retry install "cudf=${MINOR_VERSION}.*" "cudatoolkit=$CUDA_REL" \
"rapids-build-env=$MINOR_VERSION.*"

# https://docs.rapids.ai/maintainers/depmgmt/
# gpuci_mamba_retry remove --force rapids-build-env
# gpuci_mamba_retry install "your-pkg=1.0.0"

gpuci_logger "Check versions"
python --version
Expand All @@ -66,11 +61,19 @@ gpuci_logger "Clone cudf"
git clone https://github.com/rapidsai/cudf.git -b branch-$MINOR_VERSION ${CUDF_HOME}
cd $CUDF_HOME
git submodule update --init --remote --recursive
cd "${WORKSPACE}"

if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
################################################################################
# BUILD - Build libcuspatial and cuSpatial from source
################################################################################
gpuci_mamba_retry install "cudf=${MINOR_VERSION}.*" \
"cudatoolkit=$CUDA_REL" \
"rapids-build-env=$MINOR_VERSION.*"

# https://docs.rapids.ai/maintainers/depmgmt/
# gpuci_mamba_retry remove --force rapids-build-env
# gpuci_mamba_retry install "your-pkg=1.0.0"

gpuci_logger "Build cuSpatial"
cd "$WORKSPACE"
Expand Down Expand Up @@ -113,8 +116,15 @@ else
gpuci_logger "Check GPU usage"
nvidia-smi

gpuci_logger "Installing libcuspatial and libcuspatial-tests"
gpuci_mamba_retry install -c "${CONDA_ARTIFACT_PATH}" libcuspatial libcuspatial-tests

gpuci_logger "Building and installing cuspatial"
export CONDA_BLD_DIR="${WORKSPACE}/.conda-bld"
export VERSION_SUFFIX=""
gpuci_conda_retry build --croot "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" -c "${CONDA_BLD_DIR}" conda/recipes/cuspatial
gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" cuspatial

gpuci_logger "Running googletests"
for gt in "${CONDA_PREFIX}/bin/gtests/libcuspatial/"*; do
test_name=$(basename ${gt})
Expand All @@ -127,12 +137,8 @@ else
fi
done

cd "$WORKSPACE/python"

gpuci_logger "Building cuspatial"
"$WORKSPACE/build.sh" -v cuspatial

gpuci_logger "Run pytests"
cd "$WORKSPACE/python/cuspatial/cuspatial"
py.test --cache-clear --junitxml="$WORKSPACE/junit-cuspatial.xml" -v

EXITCODE=$?
Expand Down
Empty file.