|
9 | 9 |
|
10 | 10 | concurrency: |
11 | 11 | # automatically cancel the previously triggered workflows when there's a newer version |
12 | | - group: build-gpu-${{ github.event.pull_request.number || github.ref }} |
| 12 | + group: build-${{ github.event.pull_request.number || github.ref }} |
13 | 13 | cancel-in-progress: true |
14 | 14 |
|
15 | 15 | jobs: |
16 | 16 | build: |
17 | | - if: github.repository == 'Project-MONAI/tutorials' |
18 | | - container: |
19 | | - image: nvcr.io/nvidia/pytorch:24.02-py3 |
20 | | - options: --gpus all --ipc host |
21 | | - runs-on: [self-hosted, linux, x64] |
| 17 | + runs-on: ubuntu-latest |
22 | 18 | steps: |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + - name: Set up Python 3.10 |
| 21 | + uses: actions/setup-python@v3 |
| 22 | + with: |
| 23 | + python-version: '3.10' |
23 | 24 | - name: Install MONAI |
24 | 25 | id: monai-install |
25 | 26 | run: | |
26 | 27 | which python |
27 | | - nvidia-smi |
28 | | - rm -rf ../../MONAI/MONAI |
29 | | - python -m pip install --upgrade pip wheel |
30 | | - pip uninstall -y monai |
31 | | - pip uninstall -y monai |
32 | | - pip uninstall -y monai-weekly |
33 | | - pip uninstall -y monai-weekly # make sure there's no existing installation |
34 | | - BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI |
| 28 | + python -m pip install -U pip wheel |
| 29 | + python -m pip install torch torchvision torchaudio |
| 30 | +
|
35 | 31 | python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt |
36 | | - python -m pip install -U torch torchvision torchaudio |
37 | | - - uses: actions/checkout@v3 |
| 32 | + python -m pip install -r requirements.txt |
| 33 | +
|
| 34 | + BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI |
| 35 | + python -m pip list |
38 | 36 | - name: Notebook quick check |
39 | 37 | shell: bash |
40 | 38 | run: | |
41 | | - git config --global --add safe.directory /__w/tutorials/tutorials |
42 | | - git fetch origin main |
43 | | - python -m pip install -r requirements.txt; python -m pip list |
44 | 39 | python -c "import monai; monai.config.print_debug_info()" |
45 | | - export CUDA_VISIBLE_DEVICES=0 |
46 | | - git diff --name-only origin/main | while read line; do if [[ $line == *.ipynb ]]; then ./runner.sh -p " -and -wholename './${line}'"; fi; done; |
47 | | - # [[ $line == *.ipynb ]] && ./runner.sh --file "$line" |
| 40 | + git fetch origin main |
| 41 | + git diff --name-only origin/main | while read line |
| 42 | + do |
| 43 | + if [[ $line == *.ipynb ]] |
| 44 | + then |
| 45 | + ./runner.sh -p " -and -wholename './${line}'" |
| 46 | + fi |
| 47 | + done |
0 commit comments