Skip to content

Add GPU CI/CD

Add GPU CI/CD #27

Workflow file for this run

name: "GPU CI/CD"
on:
pull_request:
branches:
- 'main'
- '[rv][0-9].[0-9].[0-9]'
- '[rv][0-9].[0-9].[0-9]rc[0-9]'
types: [ labeled ]
jobs:
build-container:
if: ${{ github.event.label.name == 'gpuci' }}
uses: ./.github/workflows/_build_container.yml
gpu-test:
needs: build-container
runs-on: self-hosted
if: ${{ github.event.label.name == 'gpuci' }}
steps:
- name: Remove existing container if it exists
run: |
if [ "$(docker ps -aq -f name=nemo-curator-container)" ]; then
docker rm -f nemo-curator-container
fi
- name: Run Docker container with Python 3.10
run: |
docker run --gpus all --runtime=nvidia --name nemo-curator-container -d nemoci.azurecr.io/nemo_curator_container:${{ github.run_id }} bash -c "sleep infinity"
- name: Check environment
run: |
whoami
docker exec nemo-curator-container nvidia-smi
docker exec nemo-curator-container pytest --markers
- name: Verify installations
run: |
docker exec nemo-curator-container pip list
- name: Run PyTests with GPU mark
run: |
docker exec nemo-curator-container pytest -m gpu
- name: Cleanup
run: |
docker stop nemo-curator-container && docker rm nemo-curator-container