Skip to content

Add checks for monai bundles after download and warn if incompatible … #2055

Add checks for monai bundles after download and warn if incompatible …

Add checks for monai bundles after download and warn if incompatible … #2055

Workflow file for this run

# this is the docker image releasing pipeline, pushing to https://hub.docker.com/r/projectmonai/monai
name: docker
# versioning: compute a static version file
# local_docker: use the version file to build docker images
# docker_test_latest: test the latest internal docker image (has flake)
# docker_test_dockerhub: test the latest dockerhub release (no flake)
on:
# dev only docker deployment and quick tests
push:
branches:
- dev
# 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'
if: ${{ false }} # disable docker build job project-monai/monai#7450
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# full history so that we can git describe
with:
ref: dev
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
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@v4
with:
name: _version.py
path: build/lib/monai/_version.py
- name: Clean up directory
shell: bash
run: |
ls -al
rm -rf {*,.[^.]*}
docker_build_dev:
# if: github.repository == 'Project-MONAI/MONAI'
if: ${{ false }} # disable docker build job project-monai/monai#7450
needs: versioning_dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
- name: Download version
uses: actions/download-artifact@v4
with:
name: _version.py
- name: docker_build
shell: bash
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
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'
if: ${{ false }} # disable self-hosted job project-monai/monai#7039
needs: docker_build_dev
container:
image: docker://projectmonai/monai:latest
options: "--shm-size=4g --ipc=host"
runs-on: [self-hosted, linux, X64, docker]
steps:
- name: Import
run: |
export OMP_NUM_THREADS=4 MKL_NUM_THREADS=4 CUDA_VISIBLE_DEVICES= # cpu-only
python -c 'import monai; monai.config.print_debug_info()'
cd /opt/monai
ls -al
ngc --version
./runtests.sh --min
shell: bash
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}