@@ -88,6 +88,113 @@ For granular testing, use the following endpoints:
8888
8989 _ Tip:_ In interactive mode, type ` exit ` to quit.
9090
91+ ## 🚀 Deploy on TEE
92+
93+ Deploy on a [ Confidential Space] ( https://cloud.google.com/confidential-computing/confidential-space/docs/confidential-space-overview ) using AMD SEV.
94+
95+ ### Prerequisites
96+
97+ - ** Google Cloud Platform Account:**
98+ Access to the ` verifiable-ai-hackathon ` project is required.
99+
100+ - ** OpenRouter API Key:**
101+ Ensure your [ OpenRouter API key] ( https://openrouter.ai/settings/keys ) is in your ` .env ` .
102+
103+ - ** gcloud CLI:**
104+ Install and authenticate the [ gcloud CLI] ( https://cloud.google.com/sdk/docs/install ) .
105+
106+ ### Environment Configuration
107+
108+ 1 . ** Set Environment Variables:**
109+ Update your ` .env ` file with:
110+
111+ ``` bash
112+ TEE_IMAGE_REFERENCE=ghcr.io/flare-research/flare-ai-consensus:main # Replace with your repo build image
113+ INSTANCE_NAME=< PROJECT_NAME-TEAM_NAME>
114+ ```
115+
116+ 2 . ** Load Environment Variables:**
117+
118+ ``` bash
119+ source .env
120+ ```
121+
122+ > ** Reminder:** Run the above command in every new shell session.
123+
124+ 3 . ** Verify the Setup:**
125+
126+ ``` bash
127+ echo $TEE_IMAGE_REFERENCE # Expected output: Your repo build image
128+ ```
129+
130+ ### Deploying to Confidential Space
131+
132+ Run the following command:
133+
134+ ``` bash
135+ gcloud compute instances create $INSTANCE_NAME \
136+ --project=verifiable-ai-hackathon \
137+ --zone=us-central1-d \
138+ --machine-type=n2d-standard-2 \
139+ --network-interface=network-tier=PREMIUM,nic-type=GVNIC,stack-type=IPV4_ONLY,subnet=default \
140+ --metadata=tee-image-reference=$TEE_IMAGE_REFERENCE ,\
141+ tee-container-log-redirect=true,\
142+ tee-env-OPEN_ROUTER_API_KEY=$OPEN_ROUTER_API_KEY ,\
143+ --maintenance-policy=MIGRATE \
144+ --provisioning-model=STANDARD \
145+ --service-account=confidential-sa@verifiable-ai-hackathon.iam.gserviceaccount.com \
146+ --scopes=https://www.googleapis.com/auth/cloud-platform \
147+ --min-cpu-platform=" AMD Milan" \
148+ --tags=flare-ai,http-server,https-server \
149+ --create-disk=auto-delete=yes,\
150+ boot=yes,\
151+ device-name=$INSTANCE_NAME ,\
152+ image=projects/confidential-space-images/global/images/confidential-space-debug-250100,\
153+ mode=rw,\
154+ size=11,\
155+ type=pd-standard \
156+ --shielded-secure-boot \
157+ --shielded-vtpm \
158+ --shielded-integrity-monitoring \
159+ --reservation-affinity=any \
160+ --confidential-compute-type=SEV
161+ ```
162+
163+ #### Post-deployment
164+
165+ After deployment, you should see an output similar to:
166+
167+ ``` plaintext
168+ NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
169+ consensus-team1 us-central1-d n2d-standard-2 10.128.0.18 34.41.127.200 RUNNING
170+ ```
171+
172+ It may take a few minutes for Confidential Space to complete startup checks.
173+ You can monitor progress via the [ GCP Console] ( https://console.cloud.google.com/welcome?project=verifiable-ai-hackathon ) by clicking ** Serial port 1 (console)** .
174+ When you see a message like:
175+
176+ ``` plaintext
177+ INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
178+ ```
179+
180+ the container is ready. Navigate to the external IP of the instance (visible in the GCP Console) to access the Chat UI.
181+
182+ ### 🔧 Troubleshooting
183+
184+ If you encounter issues, follow these steps:
185+
186+ 1 . ** Check Logs:**
187+
188+ ``` bash
189+ gcloud compute instances get-serial-port-output $INSTANCE_NAME --project=verifiable-ai-hackathon
190+ ```
191+
192+ 2 . ** Verify API Key(s):**
193+ Ensure that all API Keys are set correctly (e.g. ` OPEN_ROUTER_API_KEY ` ).
194+
195+ 3 . ** Check Firewall Settings:**
196+ Confirm that your instance is publicly accessible on port ` 80 ` .
197+
91198## 🔜 Next Steps & Future Directions
92199
93200- ** Security & TEE Integration:**
0 commit comments