Configuring model import script in air-gapped environment

To configure the model import utility in air-gapped environment, run the import_to_airgap.py script with the --configure flag.

  1. Run the import_to_airgap.py script with the --configure flag.
    # python import_to_airgap.py --configure

    The script prompts you for configuration details, as shown in the example output.

    Cloudera recommends configuring a secure cloud storage:

    [root@[***USER***] airgap]# python import_to_airgap.py --configure
    
    === Airgap model import configuration ===
    Enter default model download/source path [/root/.airgap/model]: 
    Enter authentication token (for HuggingFace) [current: ********]: 
    Enter cloud provider (aws/azure) [azure]: 
    Enter default destination path in cloud storage [s3://[***BUCKET NAME***]/secured-models]: 
    
    --- On premises Configuration ---
    Enter S3 endpoint URL [https://[***Domain:PORT***]]: 
    Allow insecure SSL connections? (yes/no) [yes]: no
    Enter path to CA bundle file [none]: 
    
    Configuration saved to /root/.airgap/config.json
    
    Configuration complete!
    
  2. Verify the settings by inspecting the generated config.json file.
    # cat /root/.airgap/config.json
    
    {
      "path": "/root/.airgap/model",
      "token": "",
      "cloud": "aws",
      "dst": "s3://[***BUCKET FOLDER***]/[***MODEL NAME***]"
    }