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

Update devcontainers to align with other RAPIDS repositories #1263

Merged
merged 56 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
0ff2e5a
update to rapidsai/devcontainers 23.08
Jul 11, 2023
f9e23a8
Merge branch 'branch-23.08' of https://github.com/rapidsai/cuspatial …
trxcllnt Jul 20, 2023
5dd27ff
default to CUDA 12.0
trxcllnt Jul 20, 2023
0fc48a7
add cuda-cupt-dev to CUDA 12 libs
trxcllnt Jul 20, 2023
2fa7056
temporarily use my branch with a fix to MODIFY_PREFIX_PATH
trxcllnt Jul 20, 2023
687c45b
update conda envs
trxcllnt Jul 20, 2023
cca850d
build all RAPIDS archs to take maximum advantage of sccache
trxcllnt Jul 20, 2023
b166bf3
remove temporary rapids-cmake pin
trxcllnt Jul 20, 2023
7dbb64d
add clangd and nsight vscode customizations
trxcllnt Jul 21, 2023
c562990
copy in default clangd config
trxcllnt Jul 21, 2023
f42cf2e
remove options for pip vs. conda unless using the launch script
trxcllnt Jul 21, 2023
127f17f
fix unified mounts
trxcllnt Jul 21, 2023
637d26a
Merge branch 'branch-23.08' of https://github.com/rapidsai/cuspatial …
trxcllnt Jul 21, 2023
5989d7f
ensure dirs exist before mounting
trxcllnt Jul 21, 2023
b8acf78
add kvikio
trxcllnt Jul 26, 2023
0cd8208
Merge branch 'branch-23.08' into fea/update-to-23.08-devcontainers
thomcom Jul 28, 2023
95905c9
Merge branch 'branch-23.08' of https://github.com/rapidsai/cuspatial …
trxcllnt Jul 28, 2023
70df2d0
Merge branch 'fea/update-to-23.08-devcontainers' of github.com:trxcll…
trxcllnt Jul 28, 2023
4a8760d
use volumes for isolated devcontainer source dirs
trxcllnt Jul 31, 2023
505b567
update README.md
trxcllnt Jul 31, 2023
9e9328c
Merge branch 'branch-23.08' of https://github.com/rapidsai/cuspatial …
trxcllnt Aug 1, 2023
b6b710a
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Aug 2, 2023
35d1f25
update to rapidsai/devcontainers 23.10
trxcllnt Aug 2, 2023
cf8bffe
update rapids-build-utils version to 23.10
trxcllnt Aug 2, 2023
2a24468
update .clangd config
trxcllnt Aug 3, 2023
5522e62
add .clangd config file
trxcllnt Aug 3, 2023
2c3a59f
update RAPIDS versions in devcontainer files
trxcllnt Aug 3, 2023
868614f
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Aug 8, 2023
eed427f
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Aug 11, 2023
54a07b8
update cuproj's cython version to 3.0
trxcllnt Aug 11, 2023
966056a
remove isolated and unified devcontainers, make single the default
trxcllnt Aug 14, 2023
8d527fd
separate CUDA 11.8 and 12.0 devcontainers
trxcllnt Aug 14, 2023
484dd18
clean up envvars, mounts, and build args, add codespaces post-attach …
trxcllnt Aug 17, 2023
88b3ab4
consolidate common vscode customizations
trxcllnt Aug 17, 2023
3115690
link cuproj to rmm
trxcllnt Aug 17, 2023
aa1775c
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Aug 22, 2023
03b683a
separate devcontainer mounts by CUDA version
trxcllnt Aug 23, 2023
c76a35d
add devcontainer build jobs to PR workflow
trxcllnt Aug 23, 2023
06df1c8
use pypi.nvidia.com instead of pypi.ngc.nvidia.com
trxcllnt Aug 23, 2023
a77d6bf
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Aug 30, 2023
9dad44d
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Aug 31, 2023
68e3aa3
fix venvs mount path
trxcllnt Aug 31, 2023
489164e
add clang-tools to dependencies.yaml
trxcllnt Aug 31, 2023
ddc3736
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Sep 12, 2023
48a20b4
separate CUDA 11 and CUDA 12 pip dependencies
trxcllnt Sep 12, 2023
77b6e39
be more explicit in update-versions.sh, make devcontainer build requi…
trxcllnt Sep 12, 2023
3acee93
revert rename devcontainer job
trxcllnt Sep 13, 2023
ec62b1c
update conda envs
trxcllnt Sep 18, 2023
41f0157
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Sep 19, 2023
b4e411c
build with --verbose
trxcllnt Sep 21, 2023
fdf7783
install proj dependencies into pip containers
trxcllnt Sep 21, 2023
a512881
separate CUDA 11 and 12 suffixes for pip dependencies
trxcllnt Sep 21, 2023
43b9d1b
Merge branch 'branch-23.10' of https://github.com/rapidsai/cuspatial …
trxcllnt Sep 21, 2023
42cdf47
switch workflow to branch-23.10
trxcllnt Sep 21, 2023
f696936
update clang-tools version to 16.0.6
trxcllnt Sep 21, 2023
18152f3
include pyproj in cuproj test and notebook dependencies
trxcllnt Sep 21, 2023
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
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