Skip to content

Commit bd61629

Browse files
committed
fix(deploy): improve deploy script
1 parent b660332 commit bd61629

File tree

4 files changed

+66
-35
lines changed

4 files changed

+66
-35
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ wheels/
1717
*.egg-info
1818

1919
# Other folders
20+
.github
2021
docs/
2122
examples/
2223
tests/

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GCP__MACHINE_TYPE=c3-standard-4
2222
GCP__SERVICE_ACCOUNT=confidential-sa@verifiable-ai-hackathon.iam.gserviceaccount.com
2323
GCP__TEE_IMAGE_REFERENCE=ghcr.io/flare-foundation/flare-ai-kit:main
2424
# For production, use `confidential-space-250301`
25-
GCP__IMAGE=confidential-space-debug-250301
25+
GCP__CONFIDENTIAL_IMAGE=confidential-space-debug-250301
2626
# For production, use `false`
2727
GCP__TEE_CONTAINER_LOG_REDIRECT=true
2828
GCP__CONFIDENTIAL_COMPUTE_TYPE=TDX

README.md

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,64 @@ SDK for building **verifiable AI Agents** on Flare using Confidential Space.
2222
The kit is composed of modular engines for agents, social feeds, onchain data, and consensus.
2323

2424
```mermaid
25-
graph TD
26-
A(Flare AI Kit)
27-
A --> B{Agent Framework - PydanticAI}
28-
A --> C{VectorRAG Engine - PostgreSQL + pgvector}
29-
A --> D{GraphRAG Engine - Neo4j}
30-
A --> E{Secure Enclave - Confidential Space + TDX}
31-
A --> F{Ecosystem Engine}
32-
A --> G{Social Engine}
33-
A --> H{Consensus Engine}
34-
35-
B --> I(Gemini, GPT, Grok +200 models)
36-
37-
C --o DevHub/News/Governance
38-
39-
D --o MainnetTxData
40-
41-
E --> vTPM
42-
vTPM --o RA-TLS
43-
44-
F --o M(Protocols)
45-
M --o FTSO
46-
M --o FDC
47-
M --o FAssets
48-
49-
F --o L(Applications)
50-
L --o OpenOcean
51-
L --o Kinetic
52-
L --o SparkDEX
53-
L --o Cyclo
54-
L --o ...
25+
flowchart TD
26+
A["Flare AI Kit"]
27+
28+
%% Agent Framework subgraph
29+
subgraph AgentFramework["Agent Framework"]
30+
B["Google ADK"]
31+
B --o LLM["Gemini<br>GPT<br>Grok<br>+200 models"]
32+
end
33+
34+
%% VectorRAG Engine subgraph
35+
subgraph VectorRAG["VectorRAG Engine"]
36+
C["Qdrant"]
37+
C --o SOURCE[DevHub<br>Flare News<br>Flare Governance]
38+
end
39+
40+
%% Secure Enclave subgraph
41+
subgraph SecureEnclave["Secure Enclave"]
42+
E["Confidential Space"]
43+
E --> HW[Intel TDX]
44+
HW --o RA[RA-verify<br>RA-TLS]
45+
end
46+
47+
%% Ecosystem Engine subgraph
48+
subgraph EcosystemEngine["Ecosystem Engine"]
49+
F[Ecosystem Engine]
50+
F --> PR[Protocols]
51+
PR --o PROTOS["FTSO<br>FDC<br>FAssets"]
52+
F --> AP[Applications]
53+
AP --o APPS[SparkDEX<br>OpenOcean<br>Kinetic<br>Cyclo]
54+
end
55+
56+
%% Social Engine subgraph
57+
subgraph SocialEngine["Social Engine"]
58+
G["Social"]
59+
G --o SOC["X<br>Telegram<br>Farcaster<br>Slack"]
60+
end
61+
62+
%% Consensus Engine subgraph
63+
subgraph ConsensusEngine["Consensus Engine"]
64+
H["Consensus"]
65+
H --o ALGOS[Majority<br>Tournament<br>Clustering]
66+
end
67+
68+
%% Connections to Flare AI Kit central node
69+
A --> B
70+
A --> C
71+
A --> E
72+
A --> F
73+
A --> G
74+
A --> H
5575
```
5676

5777
## 📦 Getting Started
5878

59-
**Prerequisites** Python >= 3.12 and [uv](https://github.com/astral-sh/uv).
79+
**Prerequisites**
80+
81+
- [uv](https://github.com/astral-sh/uv) with Python >= 3.12
82+
- [Docker](https://www.docker.com).
6083

6184
1. **Clone the repo:**
6285

@@ -94,6 +117,13 @@ uv run pyright
94117
uv run pytest
95118
```
96119

120+
## 🚧 Build with Docker
121+
122+
```bash
123+
docker build -t flare-ai-kit .
124+
docker run -rm --env-file .env flare-ai-kit
125+
```
126+
97127
## ☁️ Deploy to Confidential Space
98128

99129
**Prerequisites:** Authenticated [gcloud CLI](https://cloud.google.com/sdk/docs/install).

gcloud-deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fi
2626
: "${GCP__MACHINE_TYPE:?Please set GCP__MACHINE_TYPE}"
2727
: "${GCP__TEE_IMAGE_REFERENCE:?Please set GCP__TEE_IMAGE_REFERENCE}"
2828
: "${GCP__SERVICE_ACCOUNT:?Please set GCP__SERVICE_ACCOUNT}"
29-
: "${GCP__IMAGE:?Please set GCP__IMAGE}"
29+
: "${GCP__CONFIDENTIAL_IMAGE:?Please set GCP__CONFIDENTIAL_IMAGE}"
3030
: "${GCP__CONFIDENTIAL_COMPUTE_TYPE:?Please set GCP__CONFIDENTIAL_COMPUTE_TYPE}"
3131
: "${GCP__SCOPES:?Please set GCP__SCOPES}"
3232
: "${GCP__TAGS:?Please set GCP__TAGS}"
@@ -36,7 +36,7 @@ echo "--> Creating instance '$GCP__INSTANCE_NAME' in project '$GCP__PROJECT' wit
3636
echo " - Zone: $GCP__ZONE"
3737
echo " - Machine Type: $GCP__MACHINE_TYPE"
3838
echo " - Service Account: $GCP__SERVICE_ACCOUNT"
39-
echo " - Image: $GCP__IMAGE"
39+
echo " - Image: $GCP__CONFIDENTIAL_IMAGE"
4040
echo " - TEE Image Reference: $GCP__TEE_IMAGE_REFERENCE"
4141
echo " - Confidential Compute Type: $GCP__CONFIDENTIAL_COMPUTE_TYPE"
4242
echo " - Scopes: $GCP__SCOPES"
@@ -77,7 +77,7 @@ COMMAND=(
7777
--service-account="$GCP__SERVICE_ACCOUNT"
7878
--scopes="$GCP__SCOPES"
7979
--tags="$GCP__TAGS"
80-
--create-disk=auto-delete=yes,boot=yes,device-name="$GCP__INSTANCE_NAME",image=projects/confidential-space-images/global/images/"$GCP__IMAGE",mode=rw,size=11,type=pd-balanced
80+
--create-disk=auto-delete=yes,boot=yes,device-name="$GCP__INSTANCE_NAME",image=projects/confidential-space-images/global/images/"$GCP__CONFIDENTIAL_IMAGE",mode=rw,size=11,type=pd-balanced
8181
--shielded-secure-boot
8282
--shielded-vtpm
8383
--shielded-integrity-monitoring

0 commit comments

Comments
 (0)