Skip to content

Publish release images to NGC #17

Publish release images to NGC

Publish release images to NGC #17

name: Publish release images to NGC
on:
workflow_dispatch:
inputs:
RAPIDS_VER:
description: 'RAPIDS version'
required: true
jobs:
compute-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Compute matrix
id: generate-matrix
run: |
#!/bin/bash
matrix=$(yq '.' matrix.yaml | yq -o json | jq -c)
echo "matrix=${matrix}" | tee -a ${GITHUB_OUTPUT}
copy-images:
name: copy (${{ matrix.CUDA_VER }}, ${{ matrix.PYTHON_VER }})
needs: compute-matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.compute-matrix.outputs.matrix)}}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}
- name: Login to NGC
uses: docker/login-action@v3
with:
registry: nvcr.io
username: ${{ secrets.NGC_DOCKER_USER }}
password: ${{ secrets.NGC_DOCKER_PASSWORD }}
- name: Release to NGC
run: |
#!/bin/bash
set -e
CUDA_VER=${{ matrix.CUDA_VER }}
CUDA_VER_SHORT=${CUDA_VER%.*}
PYTHON_VER=${{ matrix.PYTHON_VER }}
for type in base notebooks; do
source="rapidsai/$type:${{ inputs.RAPIDS_VER }}-cuda$CUDA_VER_SHORT-py$PYTHON_VER"
target="nvcr.io/nvidia/rapidsai/$type:${{ inputs.RAPIDS_VER }}-cuda$CUDA_VER_SHORT-py$PYTHON_VER"
echo "$source => $target"
docker run -v ~/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --multi-arch all --dest-authfile=/config.json docker://$source docker://$target
done