Skip to content

Commit

Permalink
Merge pull request #1280 from rapidsai/branch-23.10
Browse files Browse the repository at this point in the history
[RELEASE] cuspatial v23.10
  • Loading branch information
raydouglass authored Oct 11, 2023
2 parents 2660aba + 38bad5c commit 8701668
Show file tree
Hide file tree
Showing 62 changed files with 1,519 additions and 1,760 deletions.
20 changes: 11 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# syntax=docker/dockerfile:1.5

ARG CUDA=12.0
ARG LLVM=16
ARG RAPIDS=23.08
ARG DISTRO=ubuntu22.04
ARG REPO=rapidsai/devcontainers

ARG BASE
ARG PYTHON_PACKAGE_MANAGER=conda

FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base
FROM ${BASE} as pip-base

ENV DEFAULT_VIRTUAL_ENV=rapids

RUN apt update -y \
&& DEBIAN_FRONTEND=noninteractive apt install -y \
sqlite3 libsqlite3-dev libtiff-dev libcurl4-openssl-dev \
&& rm -rf /tmp/* /var/tmp/* /var/cache/apt/* /var/lib/apt/lists/*;

FROM ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-base
FROM ${BASE} as conda-base

COPY --from=pip-base /etc/skel/.config/clangd/config.yaml /etc/skel/.config/clangd/config.yaml
ENV DEFAULT_CONDA_ENV=rapids

FROM ${PYTHON_PACKAGE_MANAGER}-base

Expand Down
75 changes: 0 additions & 75 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ This container is a turnkey development environment for building and testing the
* [Prerequisites](#prerequisites)
* [Host bind mounts](#host-bind-mounts)
* [Launch a Dev Container](#launch-a-dev-container)
* [via VSCode](#via-vscode)
* [via `launch.sh`](#via-launchsh)
* [Single mode](#single-mode)
* [Unified mode](#unified-mode)
* [Isolated mode](#isolated-mode)

## Prerequisites

Expand All @@ -35,76 +30,6 @@ This ensures caches, configurations, dependencies, and your commits are persiste

## Launch a Dev Container

A devcontainer can be launched directly by VSCode, or via a custom `launch.sh` shell script.

### via VSCode

To launch a devcontainer from VSCode, open the cuSpatial repo and select the "Reopen in Container" button in the bottom right:<br/><img src="https://user-images.githubusercontent.com/178183/221771999-97ab29d5-e718-4e5f-b32f-2cdd51bba25c.png"/>

Alternatively, open the VSCode command palette (typically `cmd/ctrl + shift + P`) and run the "Rebuild and Reopen in Container" command.

### via `launch.sh`

Use the `.devcontainer/launch.sh` script to start a new instance of the development container and launch a fresh VSCode window connected to it.

VSCode extends its [single-window-per-folder](https://github.com/microsoft/vscode/issues/2686) process model to devcontainers. Opening the same devcontainer in separate windows doesn't create two separate containers -- instead you have two VSCode windows each connected to the same running container.

`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.

#### Single mode

`.devcontainer/launch.sh single` launches the devcontainer with the [default bind mounts](#host-bind-mounts). RMM and cuDF are installed via the package manager.

Example:
```bash
# Launch a devcontainer that only mounts cuspatial and installs dependencies via conda
$ .devcontainer/launch.sh single conda

# or installs dependencies via pip
$ .devcontainer/launch.sh single pip
```

#### Unified mode

`.devcontainer/launch.sh unified` launches the devcontainer with the [default bind mounts](#host-bind-mounts), as well as additional `rmm` and `cudf` bind mounts (assumes RMM and cuDF are siblings to the cuspatial repository):

* `${repo}/../.rmm:/home/coder/rmm`
* `${repo}/../.cudf:/home/coder/cudf`

In this mode, RMM and cuDF will not be installed, but the devcontainer will install the dependencies necessary to build all three.

Example:
```bash
# Launch a devcontainer that mounts rmm, cudf, and cuspatial from the host and installs dependencies via conda
$ .devcontainer/launch.sh unified conda

# or installs dependencies via pip
$ .devcontainer/launch.sh unified pip
```

#### Isolated mode

`.devcontainer/launch.sh isolated` launches the devcontainer without the deps/repo bind mounts, and instead contains a unique copy of the `cuspatial` source in a Docker [volume](https://docs.docker.com/storage/volumes/).

Use this mode to launch multiple isolated development containers that can be checked out to separate branches of `cuspatial`.

The Docker volume persists after the devcontainer is removed, ensuring you don't pending lose work by accidentally removing the devcontainer.

However, you will need to manually remove the volume once you've committed and pushed your changes:

* Use the [`docker volume ls`](https://docs.docker.com/engine/reference/commandline/volume_ls/) command to list all volumes
* Use [`docker volume rm`](https://docs.docker.com/engine/reference/commandline/volume_rm/) or [`docker volume prune`](https://docs.docker.com/engine/reference/commandline/volume_prune/) to clean up unused volumes

Alternatively, use the "Dev Volumes" tab of the VSCode Dev Containers extension to view and remove unused volumes.

Examples:
```bash
# Launch a devcontainer that is isolated from changes on the host and installs dependencies via conda
$ .devcontainer/launch.sh isolated conda

# or installs dependencies via pip
$ .devcontainer/launch.sh isolated pip
```
93 changes: 0 additions & 93 deletions .devcontainer/conda/isolated/.devcontainer/devcontainer.json

This file was deleted.

95 changes: 0 additions & 95 deletions .devcontainer/conda/single/.devcontainer/devcontainer.json

This file was deleted.

Loading

0 comments on commit 8701668

Please sign in to comment.