[WIP] Add RAPIDS Nightly to GPU CI #166
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "GPU CI/CD" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- 'main' | |
- '[rv][0-9].[0-9].[0-9]' | |
- '[rv][0-9].[0-9].[0-9]rc[0-9]' | |
types: [labeled] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# Reusable job templates | |
jobs: | |
build-container: | |
if: ${{ github.event.label.name == 'gpuci' || github.ref == 'refs/heads/main' }} | |
strategy: | |
matrix: | |
include: | |
- type: stable | |
image-suffix: "" | |
- type: nightly | |
image-suffix: "_nightly" | |
uses: NVIDIA/NeMo-FW-CI-templates/.github/workflows/[email protected] | |
with: | |
image-name: nemo_curator_container${{ matrix.image-suffix }} | |
dockerfile: Dockerfile | |
image-label: nemo-curator${{ matrix.image-suffix }} | |
build-args: | | |
IMAGE_LABEL=nemo-curator${{ matrix.image-suffix }} | |
REPO_URL=https://github.com/${{ github.repository }}.git | |
CURATOR_COMMIT=${{ github.sha }} | |
BUILD_TYPE=${{ matrix.type }} | |
prune-filter-timerange: 24h | |
run-gpu-tests: | |
needs: build-container | |
runs-on: self-hosted-azure | |
if: ${{ github.event.label.name == 'gpuci' || github.ref == 'refs/heads/main' }} | |
strategy: | |
matrix: | |
include: | |
- type: stable | |
image-suffix: "" | |
- type: nightly | |
image-suffix: "_nightly" | |
env: | |
CONTAINER_NAME: nemo-curator-container${{ matrix.image-suffix }} | |
IMAGE_NAME: nemoci.azurecr.io/nemo_curator_container${{ matrix.image-suffix }}:${{ github.run_id }} | |
steps: | |
- name: Cleanup existing container | |
run: docker rm -f ${{ env.CONTAINER_NAME }} || true | |
- name: Run container | |
run: | | |
docker run --gpus all \ | |
--name ${{ env.CONTAINER_NAME }} \ | |
-d ${{ env.IMAGE_NAME }} \ | |
bash -c "sleep infinity" | |
- name: Verify environment | |
run: | | |
echo "Checking system user:" | |
docker exec ${{ env.CONTAINER_NAME }} whoami | |
echo "Checking GPU availability:" | |
docker exec ${{ env.CONTAINER_NAME }} nvidia-smi | |
echo "Checking installed packages:" | |
docker exec ${{ env.CONTAINER_NAME }} pip list | |
- name: Run GPU tests | |
run: | | |
docker exec ${{ env.CONTAINER_NAME }} \ | |
pytest -m gpu \ | |
--rootdir /opt/NeMo-Curator \ | |
/opt/NeMo-Curator/tests | |
- name: Cleanup | |
if: always() | |
run: docker rm -f ${{ env.CONTAINER_NAME }} || true |