You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can build and run Flare AI DeFAI using Docker (recommended) or set up the backend and frontend manually.
23
+
You can deploy Flare AI DeFAI using Docker (recommended) or set up the backend and frontend manually.
24
24
25
-
### Setup .env
25
+
### Environment Setup
26
26
27
-
1. Rename `.env.example` to `env` and set all the variables.
27
+
1.**Prepare the Environment File:**
28
+
Rename `.env.example` to `.env` and update the variables accordingly.
29
+
> **Tip:** Set `SIMULATE_ATTESTATION=true` for local testing.
28
30
29
-
2. Make sure `SIMULATE_ATTESTATION=true` for local testing
31
+
### Build using Docker (Recommended)
30
32
31
-
### With Docker (Recommended)
33
+
The Docker setup mimics a TEE environment and includes an Nginx server for routing, while Supervisor manages both the backend and frontend services in a single container.
32
34
33
-
The Docker build is optimized for local testing and mimics the TEE environment with minimal adjustments. It includes an Nginx server for routing and uses Supervisor to manage both backend and frontend services within a single container.
34
-
35
-
1.**Build the Docker image:**
35
+
1.**Build the Docker Image:**
36
36
37
37
```bash
38
38
docker build -t flare-ai-defai .
39
39
```
40
40
41
-
2.**Run the Docker container:**
41
+
2.**Run the Docker Container:**
42
42
43
43
```bash
44
44
docker run -p 80:80 -it --env-file .env flare-ai-defai
45
45
```
46
46
47
-
3.**Open frontend in browser**
48
-
49
-
To open the frontend, navigate to [http://localhost:80](http://localhost:80)
47
+
3.**Access the Frontend:**
48
+
Open your browser and navigate to [http://localhost:80](http://localhost:80) to interact with the Chat UI.
50
49
51
-
### Manual Setup
50
+
### Build manually
52
51
53
-
Flare AI DeFAI consists of a Python-based backend and a JavaScript frontend.
52
+
Flare AI DeFAI is composed of a Python-based backend and a JavaScript frontend. Follow these steps for manual setup:
54
53
55
54
#### Backend Setup
56
55
57
56
1.**Install Dependencies:**
58
-
Backend dependencies are managed using [uv](https://docs.astral.sh/uv/getting-started/installation/):
57
+
Use [uv](https://docs.astral.sh/uv/getting-started/installation/) to install backend dependencies:
59
58
60
59
```bash
61
60
uv sync --all-extras
62
61
```
63
62
64
63
2.**Start the Backend:**
65
-
By default, the backend is served on `0.0.0.0:8080`.
64
+
The backend runs by default on `0.0.0.0:8080`:
66
65
67
66
```bash
68
67
uv run start-backend
@@ -71,21 +70,21 @@ Flare AI DeFAI consists of a Python-based backend and a JavaScript frontend.
71
70
#### Frontend Setup
72
71
73
72
1.**Install Dependencies:**
74
-
Navigate to the `chat-ui/` directory and install the necessary packages via[npm](https://nodejs.org/en/download):
73
+
In the `chat-ui/` directory, install the required packages using[npm](https://nodejs.org/en/download):
75
74
76
75
```bash
77
76
cd chat-ui/
78
77
npm install
79
78
```
80
79
81
80
2.**Configure the Frontend:**
82
-
Modify `chat-ui/src/App.js`to update the backend URL during testing:
81
+
Update the backend URL in `chat-ui/src/App.js`for testing:
It may take a few minutes for Confidential Space to complete startup checks. You can monitor progress via the GCP Console by clicking **Serial port 1 (console)**. When you see a message like:
217
181
218
-
Once the instance is deploying and started you should be able to access it
219
-
at the IP address of instance, you can find the IP address by going to the GCP
220
-
Console and finding your instance.
182
+
```plaintext
183
+
INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
184
+
```
221
185
222
-
## 🔜 Next Steps
186
+
the container is ready. Navigate to the external IP to access the Chat UI.
223
187
224
-
Once your instance is running, access the Chat UI via the instance's public IP address.
188
+
## 🔜 Next Steps
225
189
226
-
### Example Interactions
190
+
Once your instance is running, access the Chat UI using its public IP address. Here are some example interactions to try:
227
191
228
192
-**"Create an account for me"**
229
-
-**"Show me your remote attestation"**
230
193
-**"Transfer 10 C2FLR to 0x000000000000000000000000000000000000dEaD"**
194
+
-**"Show me your remote attestation"**
231
195
232
196
## Future Upgrades
233
197
234
198
-**TLS Communication:**
235
-
Encrypt communications with a RA-TLS scheme for enhanced security.
0 commit comments