-
Notifications
You must be signed in to change notification settings - Fork 31
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
add initial devcontainers #155
base: branch-0.36
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
|
||
ARG BASE | ||
ARG PYTHON_PACKAGE_MANAGER=conda | ||
|
||
FROM ${BASE} as pip-base | ||
|
||
RUN apt update -y \ | ||
&& DEBIAN_FRONTEND=noninteractive apt install -y \ | ||
librdkafka-dev \ | ||
&& rm -rf /tmp/* /var/tmp/* /var/cache/apt/* /var/lib/apt/lists/*; | ||
|
||
ENV DEFAULT_VIRTUAL_ENV=rapids | ||
|
||
FROM ${BASE} as conda-base | ||
|
||
ENV DEFAULT_CONDA_ENV=rapids | ||
|
||
FROM ${PYTHON_PACKAGE_MANAGER}-base | ||
|
||
ARG CUDA | ||
ENV CUDAARCHS="RAPIDS" | ||
ENV CUDA_VERSION="${CUDA_VERSION:-${CUDA}}" | ||
|
||
ARG PYTHON_PACKAGE_MANAGER | ||
ENV PYTHON_PACKAGE_MANAGER="${PYTHON_PACKAGE_MANAGER}" | ||
|
||
ENV PYTHONSAFEPATH="1" | ||
ENV PYTHONUNBUFFERED="1" | ||
ENV PYTHONDONTWRITEBYTECODE="1" | ||
|
||
ENV SCCACHE_REGION="us-east-2" | ||
ENV SCCACHE_BUCKET="rapids-sccache-devs" | ||
ENV VAULT_HOST="https://vault.ops.k8s.rapids.ai" | ||
ENV HISTFILE="/home/coder/.cache/._bash_history" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# UCXX Development Containers | ||
|
||
This directory contains [devcontainer configurations](https://containers.dev/implementors/json_reference/) for using VSCode to [develop in a container](https://code.visualstudio.com/docs/devcontainers/containers) via the `Remote Containers` [extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) or [GitHub Codespaces](https://github.com/codespaces). | ||
|
||
This container is a turnkey development environment for building and testing the UCXX C++ and Python libraries. | ||
|
||
## Table of Contents | ||
|
||
* [Prerequisites](#prerequisites) | ||
* [Host bind mounts](#host-bind-mounts) | ||
* [Launch a Dev Container](#launch-a-dev-container) | ||
|
||
## Prerequisites | ||
|
||
* [VSCode](https://code.visualstudio.com/download) | ||
* [VSCode Remote Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) | ||
|
||
## Host bind mounts | ||
|
||
By default, the following directories are bind-mounted into the devcontainer: | ||
|
||
* `${repo}:/home/coder/ucxx` | ||
* `${repo}/../.aws:/home/coder/.aws` | ||
* `${repo}/../.local:/home/coder/.local` | ||
* `${repo}/../.cache:/home/coder/.cache` | ||
* `${repo}/../.conda:/home/coder/.conda` | ||
* `${repo}/../.config:/home/coder/.config` | ||
|
||
This ensures caches, configurations, dependencies, and your commits are persisted on the host across container runs. | ||
|
||
## Launch a Dev Container | ||
|
||
To launch a devcontainer from VSCode, open the UCXX 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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "11.8", | ||
"PYTHON_PACKAGE_MANAGER": "conda", | ||
"BASE": "rapidsai/devcontainers:24.02-cpp-cuda11.8-mambaforge-ubuntu22.04" | ||
} | ||
}, | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" | ||
], | ||
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda11.8-envs}"], | ||
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], | ||
"workspaceFolder": "/home/coder", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.conda/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda11.8-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "11.8", | ||
"PYTHON_PACKAGE_MANAGER": "pip", | ||
"BASE": "rapidsai/devcontainers:24.02-cpp-llvm16-cuda11.8-ubuntu22.04" | ||
} | ||
}, | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/ucx:24.2": {"version": "1.14.1"}, | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" | ||
], | ||
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda11.8-venvs}"], | ||
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], | ||
"workspaceFolder": "/home/coder", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda11.8-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "12.0", | ||
"PYTHON_PACKAGE_MANAGER": "conda", | ||
"BASE": "rapidsai/devcontainers:24.02-cpp-mambaforge-ubuntu22.04" | ||
} | ||
}, | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" | ||
], | ||
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.0-envs}"], | ||
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], | ||
"workspaceFolder": "/home/coder", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.conda/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.0-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "12.0", | ||
"PYTHON_PACKAGE_MANAGER": "pip", | ||
"BASE": "rapidsai/devcontainers:24.02-cpp-llvm16-cuda12.0-ubuntu22.04" | ||
} | ||
}, | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/ucx:24.2": {"version": "1.14.1"}, | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} | ||
|
||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" | ||
], | ||
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs}"], | ||
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], | ||
"workspaceFolder": "/home/coder", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", | ||
"source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
# Dependency list for https://github.com/rapidsai/dependency-file-generator | ||||||
files: | ||||||
all: | ||||||
output: conda | ||||||
output: [conda, pyproject] | ||||||
matrix: | ||||||
cuda: ["11.8", "12.0"] | ||||||
arch: [x86_64] | ||||||
|
@@ -70,7 +70,7 @@ dependencies: | |||||
- fmt>=10.1.1,<11 | ||||||
- &gmock gmock>=1.13.0 | ||||||
- >est gtest>=1.13.0 | ||||||
- librmm==24.2.* | ||||||
- librmm==24.02.* | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- ninja | ||||||
- spdlog>=1.12.0,<1.13 | ||||||
build_python: | ||||||
|
@@ -80,13 +80,35 @@ dependencies: | |||||
- *cmake_ver | ||||||
- cython>=3.0.0 | ||||||
- ninja | ||||||
- rmm==24.2.* | ||||||
- output_types: conda | ||||||
packages: | ||||||
- scikit-build-core>=0.7.0 | ||||||
- rmm==24.2.* | ||||||
- output_types: [requirements, pyproject] | ||||||
packages: | ||||||
- scikit-build-core[pyproject]>=0.7.0 | ||||||
- output_types: [requirements, pyproject] | ||||||
packages: | ||||||
# pip recognizes the index as a global option for the requirements.txt file | ||||||
# This index is needed for rmm. | ||||||
- --extra-index-url=https://pypi.nvidia.com | ||||||
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple | ||||||
# we need --pre for rmm 24.2, as all current versions are pre-release (alpha) | ||||||
- --pre | ||||||
Comment on lines
+96
to
+97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want to handle this with something like cudf's use of |
||||||
|
||||||
# requires https://github.com/rapidsai/dependency-file-generator/pull/48 | ||||||
# specific: | ||||||
# - output_types: [requirements, pyproject] | ||||||
# matrices: | ||||||
# - matrix: {cuda: "12.*"} | ||||||
# packages: | ||||||
# - rmm-cu12==24.2.* | ||||||
# - matrix: {cuda: "11.*"} | ||||||
# packages: | ||||||
# - rmm-cu11==24.2.* | ||||||
# - matrix: null | ||||||
# packages: null | ||||||
|
||||||
checks: | ||||||
common: | ||||||
- output_types: [conda, requirements] | ||||||
|
@@ -160,7 +182,7 @@ dependencies: | |||||
common: | ||||||
- output_types: [conda, requirements, pyproject] | ||||||
packages: | ||||||
- numpy>=1.21 | ||||||
- numpy>=1.21,<1.25 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's diagnose the root cause for this upper bound before merging. |
||||||
- pynvml>=11.4.1 | ||||||
- output_types: [conda] | ||||||
packages: | ||||||
|
@@ -177,11 +199,36 @@ dependencies: | |||||
- output_types: [conda, requirements, pyproject] | ||||||
packages: | ||||||
- cloudpickle | ||||||
- cudf==24.2.* | ||||||
- cupy | ||||||
- dask | ||||||
- distributed | ||||||
- numba>=0.57.1 | ||||||
- pytest | ||||||
- pytest-asyncio | ||||||
- pytest-rerunfailures | ||||||
- output_types: [conda] | ||||||
packages: | ||||||
- cudf==24.2.* | ||||||
- cupy | ||||||
- output_types: [requirements] | ||||||
packages: | ||||||
# pip recognizes the index as a global option for the requirements.txt file | ||||||
# This index is needed for cudf. | ||||||
- --extra-index-url=https://pypi.nvidia.com | ||||||
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple | ||||||
# we need --pre for rmm 24.2, as all current versions are pre-release (alpha) | ||||||
- --pre | ||||||
|
||||||
# requires https://github.com/rapidsai/dependency-file-generator/pull/48 | ||||||
# specific: | ||||||
# - output_types: [requirements, pyproject] | ||||||
# matrices: | ||||||
# - matrix: {cuda: "12.*"} | ||||||
# packages: | ||||||
# - cudf-cu12==24.2.* | ||||||
# - cupy-cuda12x | ||||||
# - matrix: {cuda: "11.*"} | ||||||
# packages: | ||||||
# - cudf-cu11==24.2.* | ||||||
# - cupy-cuda11x | ||||||
# - matrix: null | ||||||
# packages: null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.