Platform guide
...
Automated RedTeaming for AI/ML
Threat Informed Defense
Defense deployment
9min
this guide will help you seamlessly deploy and utilize the defense model to safeguard your valuable assets against adversarial threats prerequisites before proceeding, ensure the following prerequisites are met you have completed the analyze your models docid 5ypzn yvv16eojib5ot0u to identify vulnerabilities you have received the defense model artifact, which includes the following essential files app py the core application logic for the defense model app log py a logging module for effective monitoring config yaml a configuration file for customizing the defense model settings defense model h5 the defense model itself in hdf5 format defense model onnx an alternative format of the defense model in onnx deployment yaml if you plan to deploy on kubernetes, this configuration file is included docker compose yaml for docker container deployment, this file is provided dockerfile required for building the docker image predict py a script to make predictions using the defense model readme txt comprehensive documentation with instructions requirements txt a list of python dependencies required for the defense model deployment options the aishield defense model is designed for flexibility and can be deployed in two ways docker container deployment ideal for quick and isolated deployments requires docker to be installed on your system utilizes the provided dockerfile for image creation execute the docker container using the appropriate commands kubernetes deployment suitable for scalable and orchestrated deployments assumes you have access to a kubernetes cluster deploy and manage the defense model on your kubernetes cluster getting started to begin using the defense model and enhancing the security of your ai/ml models, follow these steps based on your chosen deployment option for docker container deployment step1 ensure docker is installed on your system step2 build the docker image using the provided dockerfile sudo docker build progress=plain t aishield ic mea defense step3 run the docker container to start using the defense model sudo docker run aishield ic mea defense feel free to customize the "aishield ic mea defense" docker container name as needed , ensuring it aligns with your preferences and environment after successfully running defense as docker container, access endpoint as follows \<get> sanity check import requests r = requests get('http //127 0 0 1 5016//predict') ## change host and port for deployment on non local device r json() you can expect response as follow {'message' 'model sanity check successful!'} \<post> predict import requests x = data ## this the data you want to query to model payload = {"data" x} \## change host and port for deployment on non local device response = requests post('http //127 0 0 1 5016//predict', json=payload, headers={"content type" "application/json"},) print(response json()) expected response {'prediction' \['low suspicious attack', 'high suspicious attack', 'high suspicious attack']} for kubernetes deployment ensure you have access to a kubernetes cluster deploy the defense model on kubernetes by applying the apply the deployment to your kubernetes cluster kubectl kubectl apply f deployment yaml this will deploy the aishield containerized defense as specified in the yaml file to your kubernetes cluster conclusion with the aishield defense model at your disposal, you are equipped to fortify your ai/ml models against potential threats and attacks this tool will significantly enhance the security of your valuable assets for any questions or assistance, please feel free to reach out to our support team at aishield contact\@bosch com