How To Include Dependencies In ML Package For Importing The Packages In Airgapped On-Prem AIC

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.

  1. Move the package to a machine where it is connected to internet and python & pip are installed
  2. Unzip the ML package and check if requirements.txt is present
  3. Create a new folder "on_prem_dependencies" in the package folder
  4. 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
  1. Install 'wheel' to convert the dependencies to .whl format. Install wheel by using command below
  • pip install wheel
  1. Once the .whl fields are downloaded, add below lines at the top of the requirements.txt file
  • no-index
  • find-links ./on_prem_dependencies
  1. Zip the package folder and then upload it to your AIC.