Scan Model Files
-
Once the AI Supply Chain Security CLI image has been deployed, it can be run as a container using the
docker runcommand as described below.- See Deploy Supply Chain CLI for deployment instructions.
-
The examples below include the US and EU regions.
-
See Command-line Arguments for more information.
Select your operating system to view installation instructions.
macOS
Linux
Windows
Select your deployment type and region. See Hybrid and Disconnected modes for more information.
Hybrid Mode - US Region
Hybrid Mode - EU Region
Local Mode
-
Replace
/home/users/modelswith the path on the local machine where models to be scanned are located.- To scan a specific file in the folder, update
--input /files-to-scanwith the file name. Example:--input /files-to-scan/test_model.pkl.
- To scan a specific file in the folder, update
-
Replace
<supply_chain_version>with the Supply Chain version number used for the scan. Example:26.4.0. -
Replace
<model_name_in_console>with either the name of an existing model from the inventory (to add a new scan version to the existing model) or a new, unique name (to create a new model entry in the inventory). -
Replace
<model_version>with either the next version number for an existing model from the inventory or a first version for a new model for the inventory. -
Using
--persistadds the scan results to an existing model in the HiddenLayer Console.
Add Certificate to Run Command
If you need to add an SSL certificate to the docker run command, you can mount the certificate at runtime.
Select your operating system to view installation instructions.
macOS
Linux
Select your deployment type and region. See Hybrid and Disconnected modes for more information.
Hybrid Mode - US Region
Hybrid Mode - EU Region
Local Mode
-
Replace
/home/users/modelswith the path on the local machine where models to be scanned are located.- To scan a specific file in the folder, update
--input /files-to-scanwith the file name. Example:--input /files-to-scan/test_model.pkl.
- To scan a specific file in the folder, update
-
This example uses $(pwd)/certs/internal-root.crt:/etc/ssl/certs/internal-root.crt:ro to mount the SSL certificate.
$(pwd)/certs/internal-root.crtis the path to the certificate on the host system./etc/ssl/certs/internal-root.crtis the container path where the certificate will be mounted.rospecifies the mount as read-only.
-
Replace
<supply_chain_version>with the Supply Chain version number used for the scan. Example:26.4.0. -
Replace
<model_name_in_console>with either the name of an existing model from the inventory (to add a new scan version to the existing model) or a new, unique name (to create a new model entry in the inventory). -
Replace
<model_version>with either the next version number for an existing model from the inventory or a first version for a new model for the inventory. -
Using
--persistadds the scan results to an existing model in the HiddenLayer Console.
Inspect Scan Results of Test ML Model
At scan completion, a scan result similar to the following will be emitted to stdout.
Scan results will be JSON-minified, but are shown formatted here for readability.