Skip to content

Commit

Permalink
temp tests
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
  • Loading branch information
wyli committed Jul 24, 2023
1 parent 5937adc commit 01eded2
Showing 1 changed file with 2 additions and 65 deletions.
67 changes: 2 additions & 65 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()'
Expand Down

0 comments on commit 01eded2

Please sign in to comment.