Platform guide
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 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:

  1. 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.
  2. 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.

Curl


Step3: Run the Docker container to start using the defense model.

Curl


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

Python


you can expect response as follow

{'message': 'Model Sanity check successful!'}

<POST> predict

Python


expected response

{'prediction': ['low suspicious attack', 'high suspicious attack', 'high suspicious attack']}

For Kubernetes Deployment:

  1. Ensure you have access to a Kubernetes cluster.
  2. Deploy the defense model on Kubernetes by applying the

Apply the deployment to your Kubernetes cluster:

Kubectl


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 [email protected]