Closed MMelQin closed 7 months ago
You can also use pip download
. With pip download
, you can specify the python version to use, and the version of the wheel to download. It can easily be that the host where you run pip does not have the same python version than the one inside the container, so it is very useful.
You can see an example here, where we use python3.9 to download the wheel for python3.8
You can also use
pip download
. Withpip download
, you can specify the python version to use, and the version of the wheel to download. It can easily be that the host where you run pip does not have the same python version than the one inside the container, so it is very useful.You can see an example here, where we use python3.9 to download the wheel for python3.8
Thanks for the input, though this defect is caused by a minor coding error, detailed in the workaround, rather than mechanism/workflow.
Thanks for detailing the workaround. In the context of following the instructions on the example app in jupyter I just added a cell before the deployment command with:
from urllib.request import urlretrieve
urlretrieve("https://files.pythonhosted.org/packages/67/df/414c50600c56de434df8a794fadecddad42fcad46f1d6b162c795d54a376/monai_deploy_app_sdk-0.6.0-py3-none-any.whl","simple_imaging_app/monai_deploy_app_sdk-0.6.0-py3-none-any.whl")
then used the updated command above to deploy:
tag_prefix = "simple_imaging_app"
!monai-deploy package simple_imaging_app -c simple_imaging_app/app.yaml -t {tag_prefix}:1.0 --platform x64-workstation --monai-deploy-sdk-file simple_imaging_app/monai_deploy_app_sdk-0.6.0-py3-none-any.whl -l DEBUG
Allowing me to continue following the steps and keeping it contained in the notebook.
Thanks a lot for making it transparent to the users!
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.
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)
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
https://pypi.org/project/monai-deploy-app-sdk/#files
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
~/.local/lib/python3.8/site-packages/holoscan/cli/packager/parameters.py
self._data["monai_deploy_sdk_filenamename"]
. Replacenamename
withname
, and save the file.Additional context
A patch release should be released to fix the simple issue in the Packager.