Commit 8938c1d
MIP-3D finetune env: rebase to openmpi5.0-cuda12.6-ubuntu24.04 base (#5032)
* Environment files for MIP3D FT
* Updated azure-mlflow version; added some manual upgrades
* changing azureml-mlflow
* MIP-3D finetune env: rebase to openmpi5.0-cuda12.6-ubuntu24.04 base
Builds on chingiz-kb/mip3d-ft-env. Replaces the ACPT-based image with the
openmpi-base curated AzureML image (same family olympus uses). Two reasons:
1. ACPT ships on a biweekly tag cadence and we cannot patch CVEs against it
on our side -- the v7 attempt (single-pip-install with explicit
pip/wheel/setuptools/cryptography/PyJWT/aiohttp/requests/python-dotenv
upgrades in both PTCA and base envs) still left scanner findings against
ffmpeg / libcjson / libzvbi / libmbedtls / .NET runtime that ACPT itself
has to fix in a base-image rebuild. We do not own that cadence.
2. mcr.microsoft.com/azureml/openmpi5.0-cuda12.6-ubuntu24.04 is on a real OS
patch cadence and has the openmpi-base curated-env layout AML training
already supports. After dropping ffmpeg (no video codepaths in MIP3D --
NIFTI/DICOM only) and libaio-dev (deepspeed dropped), the v2 scan went
from 15 findings -> 1 (a known marshmallow MED 5.3 we are pinning around
for azure-ai-ml 1.16.1 _T import compat).
Dockerfile changes:
- FROM mcr.microsoft.com/azureml/openmpi5.0-cuda12.6-ubuntu24.04:{{latest-image-tag}}
- AZUREML_CONDA_ENVIRONMENT_PATH=/azureml-envs/acft-medimageparse-3d-finetune,
matching the sibling openmpi curated envs (sklearn-1.5, automl forecasting-gpu).
- Three-step install: conda create py3.10 + pip 26.1; pip install torch==2.8.0
cu126 wheels from the pytorch index; pip install -r requirements.txt.
- Final RUN sanity-checks the fragile import chains (transformers/peft and
marshmallow/azure-ai-ml MLClient) so import breakage fails the build, not
the AML run.
- Apt set narrowed to the libgl/libsm/libxext/libxrender/libfontconfig set
that opencv-headless + matplotlib + pillow need at runtime.
requirements.txt changes:
- Drop deepspeed==0.15.1: not used. Active Lightning strategy in
olympus_biomed_parse_3d/configs/trainer/biomedparse_trainer.yaml is
ddp_find_unused_parameters_true; deepspeed strategy / optimizer config
blocks are commented out. Saves ~200MB and avoids JIT-compile risk.
- Drop ffmpeg==1.4 (python wrapper): unused. The OS ffmpeg apt tree was
responsible for 11/12 findings on the v1 openmpi scan.
- Bump transformers to >=5.0.0,<6.0.0 to fix CVE-2026-1839 (torch.load RCE
in _load_rng_state). Per Qualys advisory, only 5.0.0rc3+ has the fix.
- Bump peft to >=0.19.1,<0.20.0: 0.17.1 hard-imports HybridCache at module
load (removed in transformers 5.x); 0.19.1 moved that inside a function.
- Pin marshmallow==3.23.2 (azure-ai-ml 1.16.1 imports `_T` from
marshmallow.fields, removed in 3.24.0). The CVE-2025-68480 risk
(DoS in Schema.load(many=True)) does not apply to a training entrypoint
that does not accept untrusted input.
- Drop the explicit base-env conda upgrade RUN step (no separate base env on
the openmpi image -- the conda env we create is the only env).
Validated: built and pushed openmpi-test-20260513-184353 to ACR, scan shows
1 finding (the marshmallow pin documented above), and submitted an AML
training job on hls-4xA100 that pulled the image, activated the env,
imported the wheel, converted the safetensors checkpoint, and entered
training.
---------
Co-authored-by: chingiz-kb <ckabytayev+github@microsoft.com>1 parent 75e6fb5 commit 8938c1d
5 files changed
Lines changed: 173 additions & 0 deletions
File tree
- assets/training/finetune_acft_image/environments/acft_image_medimageparse_3d_finetune
- context
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments