Add cuspatial devcontainers by trxcllnt · Pull Request #960 · rapidsai/cuspatial (original) (raw)

Description

This PR adds some devcontainers to help simplify building the cuspatial C++ and Python libraries.

The devcontainers can be launched in one of two ways:

  1. By clicking the "Reopen in Container" button that VSCode shows when opening the repo (or by using the "Rebuild and Reopen in Container" command from the command palette):
    image
  2. By using the .devcontainer/launch.sh script, which launches new VSCode windows and instances of the devcontainer.

launch.sh takes two arguments, a mode and a package manager.

The mode argument determines how the devcontainer interacts with the files on the host:

The package manager argument can be either conda, or pip. This determines whether the devcontainer uses conda or pip to install the dependencies (the default is conda). pip is experimental/not working for normal dev, and is currently meant to aid in pip packaging work.

Examples:

Launch a devcontainer that only mounts cuspatial and installs dependencies via conda

$ .devcontainer/launch.sh

Launch a devcontainer that is isolated from changes on the host and installs dependencies via conda

$ .devcontainer/launch.sh isolated

Launch a devcontainer that mounts rmm, cudf, and cuspatial from the host and installs dependencies via conda

$ .devcontainer/launch.sh unified conda

Launch a devcontainer that is isolated from changes on the host and installs dependencies via pip

$ .devcontainer/launch.sh isolated pip

Inside the devcontainer, you can use tab-completion to explore the available commands.

Clone one of the RAPIDS repositories into the container

$ clone-

Configure the C++ CMake of (command accepts additional CMake arguments)

$ configure--cpp

Optionally configure the C++ CMake of and build the C++ (command accepts additional CMake arguments)

$ build--cpp

Optionally build the C++, then build the Python library (command accepts additional CMake arguments)

$ build--python

You can, of course, use CMake, ninja, pip install -e . etc. directly too. The above commands are only meant as aids/shortcuts! They are simple shell scripts, and you can inspect their contents via e.g. code $(which configure-cuspatial-cpp).

All the code repos are in the $HOME dir, so cleaning is straightforward:

Clean cuspatial C++

$ rm -rf ~/cuspatial/cpp/build

Clean cuspatial Python

$ rm -rf ~/cuspatial/python/cuspatial/_skbuild

Checklist