Skip to content

integration-test-command #100

integration-test-command

integration-test-command #100

Workflow file for this run

# manually trigger integration
name: integration
on:
repository_dispatch:
type: [integration-test-command]
jobs:
integration-py3:
container:
image: nvcr.io/nvidia/pytorch:22.04-py3 # CUDA 11.6 py38
options: --gpus "device=3" --ipc host # shm-size 4g works fine
runs-on: [self-hosted, linux, x64, research]
steps:
# checkout the pull request branch
- uses: actions/checkout@v3
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
path: research-contributions
- uses: actions/checkout@v3
with:
repository: Project-MONAI/MONAI
path: core
- name: Cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: Cache for pip
uses: actions/cache@v3
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
which python
pwd
ls -al .
python -m pip install --upgrade pip wheel
pip uninstall -y monai
pip uninstall -y monai
pip uninstall -y monai-weekly
pip uninstall -y monai-weekly
cd core
BUILD_MONAI=0 ./runtests.sh -b
python -m pip install -r requirements-dev.txt
python -m pip install --upgrade torch torchvision torchaudio
rm -rf /github/home/.cache/torch/hub/mmars/
- name: Verify install
run: |
python -m pip list
nvidia-smi
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
- name: Auto3dseg latest algo
shell: bash
env:
BUILD_MONAI: 0
run: |
echo "test latest algo"
ls research-contributions/
cp -r research-contributions/auto3dseg/algorithm_templates core/
cd research-contributions && git log -1 && cd ../core
pwd
ls -ll
export OMP_NUM_THREADS=4
export MKL_NUM_THREADS=4
export MONAI_TESTING_ALGO_TEMPLATE=algorithm_templates
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
python -m unittest -vvv tests.test_auto3dseg_ensemble
python -m unittest -vvv tests.test_auto3dseg_hpo
python -m unittest -vvv tests.test_integration_autorunner
python -m unittest -vvv tests.test_integration_gpu_customization
- name: Clean directory
run: |
rm -rf research-contributions
rm -rf core
- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.PR_MAINTAIN_BOT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: rocket