Encrypting a Local Model File
- Log in to the running environment of the encryption/decryption tool as user hwMindX.
- Run the following command to create an encryption/decryption working directory, for example, /home/hwMindX/software/infer:
mkdir -p /home/hwMindX/software/infer
- Run the following command to switch to the working directory:
cd /home/hwMindX/software/infer cp -r ${ResNet-50 model file path}/infer/sdk ./ chmod 500 -R infer - Use the encryption/decryption tool to encrypt the model file.
- Upload the model file to the directory.
- Upload the MK.json file to the /home/hwMindX/software directory and run the following command:
cd /home/hwMindX/software chmod 600 MK.json
- Perform encryption.
mkdir enc chmod 700 enc aiguard encrypt -i infer -o enc -f MK.json chmod 700 -R enc/encrypt
When you run the encryption command, you will be prompted to enter the password for exporting the master key. After you enter the password, an encrypted file is generated and stored in the specified directory /home/hwMindX/software/enc/encrypt/.
Parent topic: Containerized Inference in Edge Scenarios
