Skip to content

Commit

Permalink
: Move build instructions to dev guide (#999)
Browse files Browse the repository at this point in the history
Contributes to #908 and unblocks #977 

This PR moves the existing build from source instructions to the developer docs page. It does not make any changes to the instructions.

Authors:
  - Ben Jarmak (https://github.com/jarmak-nv)

Approvers:
  - H. Thomson Comer (https://github.com/thomcom)
  - Michael Wang (https://github.com/isVoid)

URL: #999
  • Loading branch information
jarmak-nv authored Mar 20, 2023
1 parent f700030 commit 1728738
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
47 changes: 47 additions & 0 deletions docs/source/developer_guide/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Build and Install cuSpatial From Source

## Pre-requisites

- gcc >= 7.5
- cmake >= 3.23
- miniconda

## Fetch cuSpatial repository

```shell
export `CUSPATIAL_HOME=$(pwd)/cuspatial` && \
git clone https://github.com/rapidsai/cuspatial.git $CUSPATIAL_HOME
```
## Install dependencies

1. `export CUSPATIAL_HOME=$(pwd)/cuspatial`
2. clone the cuSpatial repo

```shell
conda env update --file conda/environments/all_cuda-118_arch-x86_64.yaml
```

## Build and install cuSpatial

1. Compile and install
```shell
cd $CUSPATIAL_HOME && \
chmod +x ./build.sh && \
./build.sh
```

2. Run C++/Python test code

Some tests using inline data can be run directly, e.g.:

```shell
$CUSPATIAL_HOME/cpp/build/gtests/LEGACY_HAUSDORFF_TEST
$CUSPATIAL_HOME/cpp/build/gtests/POINT_IN_POLYGON_TEST
python python/cuspatial/cuspatial/tests/legacy/test_hausdorff_distance.py
python python/cuspatial/cuspatial/tests/test_pip.py
```

Some other tests involve I/O from data files under `$CUSPATIAL_HOME/test_fixtures`.
For example, `$CUSPATIAL_HOME/cpp/build/gtests/SHAPEFILE_READER_TEST` requires three
pre-generated polygon shapefiles that contain 0, 1 and 2 polygons, respectively. They are available at
`$CUSPATIAL_HOME/test_fixtures/shapefiles` <br>
3 changes: 1 addition & 2 deletions docs/source/developer_guide/development_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ dependencies and RAPIDS libraries automatically fetched and correctly versioned.
script commands for simple building and testing of all RAPIDS libraries, including cuSpatial.
`rapids-compose` is the recommended way to set up your environment to develop for cuspatial.

For developers who would like to build from conda or from source, see
[README.md](https://github.com/rapidsai/cuspatial/blob/main/README.md).
For developers who would like to build from conda or from source, see the [build page](https://docs.rapids.ai/api/cuspatial/stable/developer_guide/build.html).
1 change: 1 addition & 0 deletions docs/source/developer_guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and [C++ API reference](https://docs.rapids.ai/api/libcuspatial/stable/).
:maxdepth: 2
development_environment
build
contributing_guide
library_design
benchmarking

0 comments on commit 1728738

Please sign in to comment.