Skip to content

Commit 1cba9f8

Browse files
authored
[FEA] more docs, image cleanup, module renames (#313)
* move the modules/.cache dir to top-level * remove cuco workaround now that it's using rapids-cmake v21.12 * consolidate devel base + main images into one multi-stage build * rename devel user to rapids * make /opt/rapids the home directory of the devel user * add fixuid so devel container works when run user is different from build user * add `.vscode-server` and `.vscode-server-insiders` dirs to speed up vscode remote containers connection time * rename nteract -> notebook container, add runtime notebook container * rename runtime 01-base.Dockerfile -> base.Dockerfile * mv runtime/02-build.Dockerfile to devel/package.Dockerfile * update runtime containers' paths to package tgz * update pr workflow to reflect new composefiles * update demo notebooks so they run in the standalone notebooks container * create separate merge PR jobs so we can parallelize more, add custom action to reduce boilerplate * update yarn.lock * use npx in case cross-env isn't installed yet * update lib dirs for ubuntu18.04 * ubuntu18's env doesn't support -S * rename modules from @NVIDIA -> @rapidsai * update main.pr.yml * run in subshell and print paths * test custom build-and-publish-image action * move files into .github/workflows dir * update path * move build-and-publish-image.yml action into folder, rename to action.yml * run checkout in the workflow, not the action * add shell * add push, registry-url, registry-username, and registry-password inputs * fix typo * add names to steps, fix if expression * login to container registry in workflow, not action * make secrets be a multiline input * pass secrets into action as inputs * pass sccache credentials via secret-files * remove workflow build on pull request test * update tgz file names
1 parent e544224 commit 1cba9f8

200 files changed

Lines changed: 2058 additions & 1407 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
**/*.zip
55
**/*.*.o
66
**/*.arrow
7-
**/*.ipynb
87
**/*.geojson
98
**/*.parquet
109
**/*.tar.gz
11-
**/yarn.lock
1210
**/lerna-debug.log
1311
**/docker-compose*.yml
1412
**/compile_commands.json

.env.sample

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ UID=1000
77
PARALLEL_LEVEL=4
88

99
# `nvidia/cudagl` base image CUDA version
10-
CUDA_VERSION=11.4.2
10+
# CUDA_VERSION=11.4.2
1111

1212
# `nvidia/cudagl` base image Ubuntu version
13-
LINUX_VERSION=ubuntu20.04
13+
# LINUX_VERSION=ubuntu20.04
1414

1515
# RAPIDS version to use
16-
RAPIDS_VERSION=21.12.00
16+
# RAPIDS_VERSION=21.12.00
1717

1818
# How long sccache should wait until it considers a compile job timed out.
1919
# This number should be large, because C++ and CUDA can take a long time to compile.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: build-and-publish-image
2+
3+
description: "Build and publish a Docker image"
4+
5+
inputs:
6+
push:
7+
default: false
8+
required: false
9+
description: "Push the image to the container registry"
10+
file:
11+
required: true
12+
description: "Dockerfile to build"
13+
tags:
14+
required: true
15+
description: "Image tags to publish"
16+
secret-files:
17+
default: ""
18+
required: false
19+
description: "Optional file of secrets to mount"
20+
platforms:
21+
default: ""
22+
required: false
23+
description: "Optional platforms to build"
24+
build-args:
25+
default: ""
26+
required: false
27+
description: "Optional build arguments to use"
28+
29+
outputs:
30+
digest:
31+
description: "Image content-addressable identifier"
32+
value: ${{ steps.docker-build.outputs.digest }}
33+
metadata:
34+
description: "Build result metadata"
35+
value: ${{ steps.docker-build.outputs.metadata }}
36+
37+
runs:
38+
using: composite
39+
steps:
40+
- name: Free up disk space
41+
shell: bash
42+
run: |
43+
df -h
44+
docker images
45+
sudo swapoff -a
46+
sudo rm -f /swapfile
47+
sudo apt clean
48+
sudo rm -rf /opt/ghc "$CONDA" \
49+
/usr/share/swift \
50+
/usr/share/dotnet \
51+
/usr/local/lib/android \
52+
/home/linuxbrew/.linuxbrew \
53+
/opt/hostedtoolcache/CodeQL
54+
docker rmi $(docker image ls -aq) || true
55+
df -h
56+
docker images
57+
- name: Set up QEMU
58+
uses: docker/setup-qemu-action@v1
59+
- name: Set up Docker Buildx
60+
uses: docker/setup-buildx-action@v1
61+
with:
62+
buildkitd-flags: --debug
63+
- name: Build image
64+
id: docker-build
65+
uses: docker/build-push-action@v2
66+
with:
67+
context: .
68+
push: ${{ inputs.push }}
69+
file: ${{ inputs.file }}
70+
tags: ${{ inputs.tags }}
71+
platforms: ${{ inputs.platforms }}
72+
build-args: ${{ inputs.build-args }}
73+
secret-files: ${{ inputs.secret-files }}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build devel main image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish-devel-main-image:
10+
name: Build devel main image
11+
runs-on: ubuntu-20.04
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
CUDA: [11.0.3, 11.2.2, 11.4.2]
16+
LINUX: [ubuntu18.04, ubuntu20.04]
17+
env:
18+
ARCH: amd64
19+
NODE: 16.10.0
20+
RAPIDS: 21.12.00
21+
REPOSITORY: ghcr.io/rapidsai/node
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 2
26+
- name: Login to container registry
27+
uses: docker/login-action@v1
28+
if: github.event_name == 'push'
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.token }}
32+
password: ${{ github.repository_owner }}
33+
- name: Initialize sccache_credentials
34+
run: |
35+
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> /tmp/sccache_credentials
36+
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> /tmp/sccache_credentials
37+
- name: Build and push image
38+
uses: ./.github/actions/build-and-publish-image
39+
with:
40+
push: ${{ github.event_name == 'push' }}
41+
secret-files: |
42+
"sccache_credentials=/tmp/sccache_credentials"
43+
file: dockerfiles/devel/main.Dockerfile
44+
tags: |
45+
${{ env.REPOSITORY }}:${{ env.RAPIDS }}-devel-node${{ env.NODE }}-cudagl${{ matrix.CUDA }}-${{ matrix.LINUX }}-main-${{ env.ARCH }}
46+
build-args: |
47+
"NODE_VERSION=${{ env.NODE }}"
48+
"SCCACHE_IDLE_TIMEOUT=32768"
49+
"SCCACHE_REGION=us-west-2"
50+
"SCCACHE_BUCKET=node-rapids-sccache"
51+
"FROM_IMAGE=nvidia/cudagl:${{ matrix.CUDA }}-devel-${{ matrix.LINUX }}"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build devel packages image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish-devel-packages-image:
10+
needs:
11+
- build-and-publish-devel-main-image
12+
name: Build devel packages image
13+
runs-on: ubuntu-20.04
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
CUDA: [11.0.3, 11.2.2, 11.4.2]
18+
LINUX: [ubuntu18.04, ubuntu20.04]
19+
env:
20+
ARCH: amd64
21+
NODE: 16.10.0
22+
RAPIDS: 21.12.00
23+
REPOSITORY: ghcr.io/rapidsai/node
24+
steps:
25+
- uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 2
28+
- name: Login to container registry
29+
uses: docker/login-action@v1
30+
if: github.event_name == 'push'
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.token }}
34+
password: ${{ github.repository_owner }}
35+
- name: Initialize sccache_credentials
36+
run: |
37+
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> /tmp/sccache_credentials
38+
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> /tmp/sccache_credentials
39+
- name: Build and push image
40+
uses: ./.github/actions/build-and-publish-image
41+
with:
42+
push: ${{ github.event_name == 'push' }}
43+
secret-files: |
44+
"sccache_credentials=/tmp/sccache_credentials"
45+
file: dockerfiles/devel/package.Dockerfile
46+
tags: |
47+
${{ env.REPOSITORY }}:${{ env.RAPIDS }}-devel-node${{ env.NODE }}-cudagl${{ matrix.CUDA }}-${{ matrix.LINUX }}-packages-${{ env.ARCH }}
48+
build-args: |
49+
"PARALLEL_LEVEL=1"
50+
"SCCACHE_IDLE_TIMEOUT=32768"
51+
"SCCACHE_REGION=us-west-2"
52+
"SCCACHE_BUCKET=node-rapids-sccache"
53+
"RAPIDS_VERSION=${{ env.RAPIDS }}"
54+
"FROM_IMAGE=${{ env.REPOSITORY }}:${{ env.RAPIDS }}-devel-node${{ env.NODE }}-cudagl${{ matrix.CUDA }}-${{ matrix.LINUX }}-main-${{ env.ARCH }}"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build runtime cuda-base image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish-runtime-cuda-base-image:
10+
needs:
11+
- build-and-publish-devel-main-image
12+
name: Build runtime cuda-base image
13+
runs-on: ubuntu-20.04
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
CUDA: [11.0.3, 11.2.2, 11.4.2]
18+
LINUX: [ubuntu18.04, ubuntu20.04]
19+
env:
20+
ARCH: amd64
21+
NODE: 16.10.0
22+
RAPIDS: 21.12.00
23+
REPOSITORY: ghcr.io/rapidsai/node
24+
steps:
25+
- uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 2
28+
- name: Login to container registry
29+
uses: docker/login-action@v1
30+
if: github.event_name == 'push'
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.token }}
34+
password: ${{ github.repository_owner }}
35+
- name: Initialize sccache_credentials
36+
run: |
37+
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> /tmp/sccache_credentials
38+
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> /tmp/sccache_credentials
39+
- name: Build and push image
40+
uses: ./.github/actions/build-and-publish-image
41+
with:
42+
push: ${{ github.event_name == 'push' }}
43+
secret-files: |
44+
"sccache_credentials=/tmp/sccache_credentials"
45+
file: dockerfiles/runtime/base.Dockerfile
46+
tags: |
47+
${{ env.REPOSITORY }}:${{ env.RAPIDS }}-runtime-node${{ env.NODE }}-cuda${{ matrix.CUDA }}-${{ matrix.LINUX }}-base-${{ env.ARCH }}
48+
build-args: |
49+
"UID=1000"
50+
"FROM_IMAGE=nvidia/cuda:${{ matrix.CUDA }}-runtime-${{ matrix.LINUX }}"
51+
"DEVEL_IMAGE=${{ env.REPOSITORY }}:${{ env.RAPIDS }}-devel-node${{ env.NODE }}-cudagl${{ matrix.CUDA }}-${{ matrix.LINUX }}-main-${{ env.ARCH }}"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build runtime cudagl-base image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish-runtime-cudagl-base-image:
10+
needs:
11+
- build-and-publish-devel-main-image
12+
name: Build runtime cudagl-base image
13+
runs-on: ubuntu-20.04
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
CUDA: [11.0.3, 11.2.2, 11.4.2]
18+
LINUX: [ubuntu18.04, ubuntu20.04]
19+
env:
20+
ARCH: amd64
21+
NODE: 16.10.0
22+
RAPIDS: 21.12.00
23+
REPOSITORY: ghcr.io/rapidsai/node
24+
steps:
25+
- uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 2
28+
- name: Login to container registry
29+
uses: docker/login-action@v1
30+
if: github.event_name == 'push'
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.token }}
34+
password: ${{ github.repository_owner }}
35+
- name: Initialize sccache_credentials
36+
run: |
37+
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> /tmp/sccache_credentials
38+
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> /tmp/sccache_credentials
39+
- name: Build and push image
40+
uses: ./.github/actions/build-and-publish-image
41+
with:
42+
push: ${{ github.event_name == 'push' }}
43+
secret-files: |
44+
"sccache_credentials=/tmp/sccache_credentials"
45+
file: dockerfiles/runtime/base.Dockerfile
46+
tags: |
47+
${{ env.REPOSITORY }}:${{ env.RAPIDS }}-runtime-node${{ env.NODE }}-cudagl${{ matrix.CUDA }}-${{ matrix.LINUX }}-base-${{ env.ARCH }}
48+
build-args: |
49+
"UID=1000"
50+
"FROM_IMAGE=nvidia/cudagl:${{ matrix.CUDA }}-runtime-${{ matrix.LINUX }}"
51+
"DEVEL_IMAGE=${{ env.REPOSITORY }}:${{ env.RAPIDS }}-devel-node${{ env.NODE }}-cudagl${{ matrix.CUDA }}-${{ matrix.LINUX }}-main-${{ env.ARCH }}"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build runtime cudf image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish-runtime-cudf-image:
10+
needs:
11+
- build-and-publish-devel-packages-image
12+
- build-and-publish-runtime-cuda-base-image
13+
name: Build runtime cudf image
14+
runs-on: ubuntu-20.04
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
CUDA: [11.0.3, 11.2.2, 11.4.2]
19+
LINUX: [ubuntu18.04, ubuntu20.04]
20+
env:
21+
ARCH: amd64
22+
NODE: 16.10.0
23+
RAPIDS: 21.12.00
24+
REPOSITORY: ghcr.io/rapidsai/node
25+
steps:
26+
- uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 2
29+
- name: Login to container registry
30+
uses: docker/login-action@v1
31+
if: github.event_name == 'push'
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.token }}
35+
password: ${{ github.repository_owner }}
36+
- name: Initialize sccache_credentials
37+
run: |
38+
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> /tmp/sccache_credentials
39+
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> /tmp/sccache_credentials
40+
- name: Build and push image
41+
uses: ./.github/actions/build-and-publish-image
42+
with:
43+
push: ${{ github.event_name == 'push' }}
44+
secret-files: |
45+
"sccache_credentials=/tmp/sccache_credentials"
46+
file: dockerfiles/runtime/cudf.Dockerfile
47+
tags: |
48+
${{ env.REPOSITORY }}:${{ env.RAPIDS }}-runtime-node${{ env.NODE }}-cuda${{ matrix.CUDA }}-${{ matrix.LINUX }}-cudf-${{ env.ARCH }}
49+
build-args: |
50+
"FROM_IMAGE=${{ env.REPOSITORY }}:${{ env.RAPIDS }}-runtime-node${{ env.NODE }}-cuda${{ matrix.CUDA }}-${{ matrix.LINUX }}-base-${{ env.ARCH }}"
51+
"DEVEL_IMAGE=${{ env.REPOSITORY }}:${{ env.RAPIDS }}-devel-node${{ env.NODE }}-cudagl${{ matrix.CUDA }}-${{ matrix.LINUX }}-packages-${{ env.ARCH }}"

0 commit comments

Comments
 (0)