Skip to content

Latest commit

 

History

History
88 lines (59 loc) · 3.62 KB

README.md

File metadata and controls

88 lines (59 loc) · 3.62 KB

Quick Start

Introduction

Quick start guides you through the basic verification process of Confidential-AI, which includes the following steps:

  1. Deploying Trustee as a user-controlled component that stores sensitive data.
  2. Encrypting the model file, uploading the encrypted model to Trustee, and saving the encryption key in Trustee.
  3. Deploying Trustiflux as a trusted component in the cloud.
  4. Verifying the cloud environment through remote attestation, obtaining the encryption key and the encrypted model from Trustee, and decrypting the model to mount in a trusted environment.

According to the threat model, the first two steps occur on the user side, while the last two steps happen in the cloud. However, for the sake of demonstration, the process shown in this document is based on the same Alibaba Cloud TDX ECS and utilizes a local network.

Environment Preparation

Configuring and Starting Trustee

  1. Download the Confidential-AI code.
git clone https://github.com/inclavare-containers/Confidential-AI.git
  1. (Optional) Configure the Confidential-AI/.env file. Non-empty fields must match the Trustiflux-side configuration.
  • MODEL_TYPE: Model type, currently supports Qwen3-0.6B|DeepSeek-R1-Chat|Qwen-7B-Instruct;
  • GOCRYPTFS_PASSWORD: Encryption key string;
  • KBS_KEY_PATH: Path to the encrypted key in Trustee;
  • ENCRYPT_MODEL_IP: IP address of the file web service on Trustee side;
  • ENCRYPT_MODEL_PORT: Port of the file web service on Trustee side;
  • TRUSTEE_ADDRESS: Service address of Trustee;
  • TRUSTEE_AS_ADDR: Service address of Trustee AS.
  1. Navigate to the Trustee folder and run the run.sh file.
cd Confidential-AI/Trustee
./run.sh

Configuring and Starting Trustiflux

  1. Download the Confidential-AI code.
git clone https://github.com/inclavare-containers/Confidential-AI.git
  1. (Optional) Configure the Confidential-AI/.env file. Non-empty fields must match the Trustee-side configuration.
  • MODEL_TYPE: Model type, currently supports Qwen3-0.6B|DeepSeek-R1-Chat|Qwen-7B-Instruct;
  • GOCRYPTFS_PASSWORD: Leave empty; it will be obtained from Trustee via remote attestation;
  • KBS_KEY_PATH: Path to the encrypted key in Trustee;
  • ENCRYPT_MODEL_IP: IP address of the file web service on Trustee side;
  • ENCRYPT_MODEL_PORT: Port of the file web service on Trustee side;
  • TRUSTEE_ADDRESS: Service address of Trustee;
  • TRUSTEE_AS_ADDR: Service address of Trustee AS.
  1. Navigate to the Trustiflux folder and run the run.sh file.
cd Confidential-AI/Trustiflux
./run.sh

Requesting Model Application

On the Trustee side, access the following URL to send a request to Trustiflux via the TNG trusted channel and access the inference web service:

http://127.0.0.1:9001/

The inference web service deployed on the Trustiflux side will be accessible if the CAI deployment is successful.

Troubleshooting

  1. Image Pulling is Slow or Fails

Configure image acceleration based on Alibaba Cloud ACR. Refer to the official image acceleration documentation.

  1. Failed to Run run.sh

First run the clean.sh file in the same directory, then run run.sh.

  1. Execution fails in CSV environment

Please refer to CSV Virtual Machine Confidential_AI to ensure the CSV environment is configured correctly.