diff --git a/conda/recipes/cugraph/build.sh b/conda/recipes/cugraph/build.sh new file mode 100644 index 00000000000..0e1c913ebda --- /dev/null +++ b/conda/recipes/cugraph/build.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +CMAKE_COMMON_VARIABLES="-DNVG_PLUGIN=TRUE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release" + + +if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then + # C++11 requires 10.9 + # but cudatoolkit 8 is build for 10.11 + export MACOSX_DEPLOYMENT_TARGET=10.11 +fi + +# show environment +printenv +# Cleanup local git +git clean -xdf +# Use CMake-based build procedure +mkdir build +cd build +# configure +cmake $CMAKE_COMMON_VARIABLES .. +# build +make -j VERBOSE=1 install + +cd .. +python setup.py install \ No newline at end of file diff --git a/conda/recipes/cugraph/meta.yaml b/conda/recipes/cugraph/meta.yaml new file mode 100644 index 00000000000..463b7c16b88 --- /dev/null +++ b/conda/recipes/cugraph/meta.yaml @@ -0,0 +1,35 @@ +# Copyright (c) 2018, NVIDIA CORPORATION. + +# Usage: +# conda build -c defaults -c conda-forge . +{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} +{% set git_revision_count=environ.get('GIT_DESCRIBE_NUMBER', 0) %} +{% set cuda_version='.'.join(environ.get('CUDA_VERSION', 'unknown').split('.')[:2]) %} +{% set py_version=environ.get('CONDA_PY', 35) %} +package: + name: cugraph + version: {{ version }} + +source: + path: ../../.. + +build: + number: {{ git_revision_count }} + string: cuda{{ cuda_version }}_py{{ py_version }}_{{ git_revision_count }} + +requirements: + build: + - cmake 3.12.4 + - python + - cython=0.28.* + - nvgraph {{ version }} + run: + - python + - cython=0.28.* + - nvgraph {{ version }} + +about: + home: http://rapids.ai/ + license: Apache 2.0 + license_file: LICENSE + summary: cugraph Library diff --git a/conda_build.sh b/conda_build.sh new file mode 100755 index 00000000000..9a5b567a30f --- /dev/null +++ b/conda_build.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +set -xe + +conda install conda-build anaconda-client conda-verify -y +conda build -c nvidia -c rapidsai -c conda-forge -c defaults --python=${PYTHON} conda/recipes/cugraph + +if [ "$UPLOAD_PACKAGE" == '1' ]; then + export UPLOADFILE=`conda build -c nvidia -c rapidsai -c conda-forge -c defaults --python=${PYTHON} conda/recipes/cugraph --output` + SOURCE_BRANCH=master + + test -e ${UPLOADFILE} + CUDA_REL=${CUDA:0:3} + if [ "${CUDA:0:2}" == '10' ]; then + # CUDA 10 release + CUDA_REL=${CUDA:0:4} + fi + + LABEL_OPTION="--label dev --label cuda${CUDA_REL}" + if [ "${LABEL_MAIN}" == '1' ]; then + LABEL_OPTION="--label main --label cuda${CUDA_REL}" + fi + echo "LABEL_OPTION=${LABEL_OPTION}" + + if [ -z "$MY_UPLOAD_KEY" ]; then + echo "No upload key" + return 0 + fi + + echo "Upload" + echo ${UPLOADFILE} + anaconda -t ${MY_UPLOAD_KEY} upload -u nvidia ${LABEL_OPTION} --force ${UPLOADFILE} +else + echo "Skipping upload" +fi \ No newline at end of file