Description
Describe the bug
Note: a workaround is provided at the end of the bug report.
With MONAI Deploy App SDK v0.6, when packaging an application using the monai-deploy package
command with only the specified mandatory arguments, e.g. monai-deploy package simple_imaging_app -c simple_imaging_app/app.yaml -t simple_app:1.0 --platform x64-workstation
, the packager fails with the follow error:
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref y8uxyvatmaopuhvxtrc49hyqj::owxhqwev8q82fnss9a02pnx2q: "/None": not found
More detailed log would show Docker build error, e.g.
#22 [16/21] COPY ./None /tmp/None
#22 ERROR: failed to calculate checksum of ref y8uxyvatmaopuhvxtrc49hyqj::owxhqwev8q82fnss9a02pnx2q: "/None": not found
------
> [16/21] COPY ./None /tmp/None:
------
Dockerfile:78
--------------------
76 |
77 | # Copy user-specified MONAI Deploy SDK file
78 | >>> COPY ./None /tmp/None
79 | RUN pip install /tmp/None
80 |
Steps/Code to reproduce bug
Easiest is to run one of the Jupyter notebook in the example and watch the App Packaging steps.
Expected behavior
The Packager is expected to pip install monai-deploy-app-sdk
from pypi,org, but it has a bug in detecting that monai-deploy-app-sdk Wheel file is NOT provided and still enforces to copy and install the App SDK with the non-existent Wheel file.
Environment details (please complete the following information)
- OS/Platform: Ubuntu 20.04 LTS
- Python Version: 3.8.10
- Method of MONAI Deploy App SDK install: [pip, conda]
- SDK Version: 0.6
Workaround
The workarounds are known, and the simplest one is to download the monai-deploy-app-sdk Python Wheel file, and provide it when running the Packager (add -l DEBUG
to see detailed output), e.g.
monai-deploy package simple_imaging_app -c simple_imaging_app/app.yaml -t simple_app:1.0 --platform x64-workstation --monai-deploy-sdk-file monai_deploy_app_sdk-0.6.0-py3-none-any.whl
To download the App SDK Wheel file
- In the browser, navigate to
https://pypi.org/project/monai-deploy-app-sdk/#files
- Find the .whl file under the section Built Distribution, monai_deploy_app_sdk-0.6.0-py3-none-any.whl,
- Click the file to start downloading
- Locate the downloaded .whl file and note its full path for use during packaging
- Alternative way to the above steps is to use
wget https://files.pythonhosted.org/packages/67/df/414c50600c56de434df8a794fadecddad42fcad46f1d6b162c795d54a376/monai_deploy_app_sdk-0.6.0-py3-none-any.whl
Advanced Workaround
pip install monai-deploy-app-sdk
- Locate the installed Holoscan SDK source file in the site-packages folder, i.e.
~/.local/lib/python3.8/site-packages/holoscan/cli/packager/parameters.py
- Open the above file in a text editor
- On line 106, find
self._data["monai_deploy_sdk_filenamename"]
. Replacenamename
withname
, and save the file. - Once the above is done, the Packager should work with only the mandatory arguments and will be able to properly pip install the App SDK in the MAP image.
Additional context
A patch release should be released to fix the simple issue in the Packager.