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

If ML packages do 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 AI Center, the dependencies need to be included in the ML package. Follow the below steps to include the dependencies in the ML package itself.

  1. Move the package to a machine where it is connected to the 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 the command below:
  • pip download -r -d --no-cache-dir
  1. Install 'wheel' to convert the dependencies to .whl format. Install wheel by using the command below:
  • pip install wheel
  1. Once the .whl fields are downloaded, add the 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 AI Center.