From 01eded2a33b282273a86ffbe0090b5e58a75de77 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Mon, 24 Jul 2023 07:55:14 +0100 Subject: [PATCH] temp tests Signed-off-by: Wenqi Li --- .github/workflows/docker.yml | 67 ++---------------------------------- 1 file changed, 2 insertions(+), 65 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 30a7714a277..a23c3137118 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,85 +9,22 @@ on: push: branches: - dev + - temp-test # Allows you to run this workflow manually from the Actions tab # This is to trigger building/testing docker image from dev only. workflow_dispatch: jobs: - versioning_dev: - # compute versioning file from python setup.py - # upload as artifact - if: github.repository == 'Project-MONAI/MONAI' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - # full history so that we can git describe - with: - ref: dev - fetch-depth: 0 - - name: Set up Python 3.9 - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - shell: bash - run: | - git describe - python -m pip install -U pip wheel setuptools - python setup.py build - cat build/lib/monai/_version.py - - name: Upload version - uses: actions/upload-artifact@v3 - with: - name: _version.py - path: build/lib/monai/_version.py - - name: Clean up directory - shell: bash - run: | - ls -al - rm -rf {*,.[^.]*} - - docker_build_dev: - # builds projectmonai/monai:latest - if: github.repository == 'Project-MONAI/MONAI' - needs: versioning_dev - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: dev - - name: Download version - uses: actions/download-artifact@v3 - with: - name: _version.py - - name: docker_build - shell: bash - run: | - docker --version - # get tag info for versioning - cat _version.py - mv _version.py monai/ - - # build "latest": remove flake package as it is not needed on hub.docker.com - sed -i '/flake/d' requirements-dev.txt - docker build -t projectmonai/monai:latest -f Dockerfile . - - # distribute as always w/ tag "latest" to hub.docker.com - echo "${{ secrets.DOCKER_PW }}" | docker login -u projectmonai --password-stdin - - docker push projectmonai/monai:latest - docker logout - docker image prune -f - docker_test_dockerhub: if: github.repository == 'Project-MONAI/MONAI' needs: docker_build_dev container: image: docker://projectmonai/monai:latest - options: "--shm-size=4g --ipc=host" runs-on: ubuntu-latest steps: - name: Import run: | + rm -rf /opt/hostedtoolcache export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1) echo $CUDA_VISIBLE_DEVICES python -c 'import monai; monai.config.print_debug_info()'