If ML packages does not have required dependencies included, how to add dependencies to the package so that it can imported into Airgapped On-Prem installations where the packages cannot be downloaded from online repositories.
For Airgapped AIC, the dependencies needs to included in the ML package. Follow below steps to include the dependencies in the ML package itself.
- Move the package to a machine where it is connected to internet and python & pip are installed
- Unzip the ML package and check if requirements.txt is present
- Create a new folder "on_prem_dependencies" in the package folder
- Download the dependencies as .whl files using pip using command below
- pip download -r <path to requirements.txt file> -d <path to on_prem_dependencies folder> --no-cache-dir
- Install 'wheel' to convert the dependencies to .whl format. Install wheel by using command below
- pip install wheel
- Once the .whl fields are downloaded, add below lines at the top of the requirements.txt file
- find-links ./on_prem_dependencies
- Zip the package folder and then upload it to your AIC.