add dockerfile and oliver's other suggestions #2
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: | ||
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: Run nvidia-smi test | ||
run: | | ||
whoami | ||
nvidia-smi | ||
- name: Run Docker container with Python 3.10 | ||
run: | | ||
docker run --name nemo-curator-container -d nemoci.azurecr.io/nemo_curator_container:${{ github.run_id }} bash -c "sleep infinity" | ||
- name: Verify installation | ||
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 | ||