Bump the uv group across 1 directory with 4 updates #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| docker: | |
| runs-on: ${{ matrix.os.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - name: linux | |
| runner: [self-hosted, Linux] | |
| gpu: true | |
| gpu_args: "--runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=5" | |
| - name: windows | |
| runner: [self-hosted, Windows] | |
| gpu: true | |
| gpu_args: "--gpus all" # pin a device with: --gpus '\"device=5\"' | |
| image: | |
| - name: shipai/boa-cli | |
| dockerfile: scripts/cli.dockerfile | |
| defaults: | |
| run: | |
| shell: bash # Git Bash on Windows, bash on Linux | |
| env: | |
| MSYS_NO_PATHCONV: 1 # stop Git Bash from rewriting the -v paths on Windows | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v6 | |
| - name: Download DICOM | |
| run: | | |
| zip_file="$GITHUB_WORKSPACE/test_images/dicoms.zip" | |
| dicom_dir="$GITHUB_WORKSPACE/test_images/dicoms" | |
| mkdir -p "$dicom_dir" | |
| curl --fail --show-error --silent --location \ | |
| --max-time 600 \ | |
| --get "${{ secrets.TCIA_API }}" \ | |
| --data-urlencode "SeriesInstanceUID=${{ secrets.TCIA_UID }}" \ | |
| --data-urlencode "NewFileNames=Yes" \ | |
| --output "$zip_file" | |
| unzip -q "$zip_file" -d "$dicom_dir" | |
| rm "$zip_file" | |
| - name: Build image | |
| run: | | |
| docker build -t "${{ matrix.image.name }}:test" -f "${{ matrix.image.dockerfile }}" . | |
| - name: Run GPU inference with parameters | |
| if: ${{ matrix.os.gpu }} | |
| run: | | |
| mkdir -p "$GITHUB_WORKSPACE/test_images/boa_cli/gpu_cnr" | |
| docker run --rm \ | |
| -v "$GITHUB_WORKSPACE/test_images/dicoms:/dicoms" \ | |
| -v "$GITHUB_WORKSPACE/test_images/boa_cli/gpu_cnr:/workspace" \ | |
| ${{ matrix.os.gpu_args }} \ | |
| -e DOCKER_USER=$(id -u):$(id -g) \ | |
| --shm-size=8g --ulimit memlock=-1 --ulimit stack=67108864 \ | |
| "${{ matrix.image.name }}:test" \ | |
| body_organ_analysis -m bca+heartchambers_highres -v --cnr-adjustment --theme light -l "${{ secrets.LICENSE_NUMBER }}" | |
| - name: Run CPU inference with .env | |
| run: | | |
| mkdir -p "$GITHUB_WORKSPACE/test_images/boa_cli/cpu" | |
| docker run --rm \ | |
| -v "$GITHUB_WORKSPACE/test_images/dicoms:/dicoms" \ | |
| -v "$GITHUB_WORKSPACE/test_images/boa_cli/cpu:/workspace" \ | |
| -e DOCKER_USER=$(id -u):$(id -g) \ | |
| -e DEVICE=cpu \ | |
| -e THEME=dark \ | |
| -e FAST_BCA=true \ | |
| -e FAST_TOTAL=1 \ | |
| -e VERBOSE=TRUE \ | |
| -e BCA_NO_PDF=1 \ | |
| -e SKIP_CONTRAST_INFORMATION=true \ | |
| --shm-size=8g --ulimit memlock=-1 --ulimit stack=67108864 \ | |
| "${{ matrix.image.name }}:test" \ | |
| python -m body_organ_analysis -m bca+total |