Skip to content

Commit 805e8bb

Browse files
Add our current architecture to the blog (LAION-AI#1483)
* Add our current architecture to the blog * Update docs/blog/2023-02-11-architecture.md Co-authored-by: Andrew Maguire <andrewm4894@gmail.com> --------- Co-authored-by: Andrew Maguire <andrewm4894@gmail.com>
1 parent 5347551 commit 805e8bb

8 files changed

+12677
-8953
lines changed

.github/workflows/deploy-docs-site.yaml

+16-9
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,28 @@ jobs:
2828
- name: Setup Node
2929
uses: actions/setup-node@v3
3030
with:
31-
node-version: "16"
31+
node-version: "18"
3232

33-
- name: Get yarn cache
34-
id: yarn-cache
35-
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
33+
- name: Setup yarn
34+
run:
35+
corepack enable && corepack prepare yarn@stable --activate && mkdir
36+
~/.yarn
3637

37-
- name: Cache dependencies
38+
- id: yarn-cache-dir-path
39+
name: Get yarn cache directory path
40+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
41+
working-directory: docs
42+
43+
- name: Restore yarn cache
3844
uses: actions/cache@v3
3945
with:
40-
path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
41-
key: ${{ runner.os }}-docs-${{ hashFiles('**/yarn.lock') }}
46+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
47+
key:
48+
yarn-cache-folder-${{ hashFiles('docs/yarn.lock', '.yarnrc.yml') }}
4249
restore-keys: |
43-
${{ runner.os }}-docs-
50+
yarn-cache-folder-
4451
45-
- run: yarn install --frozen-lockfile
52+
- run: yarn install --immutable
4653
- run: yarn build
4754

4855
- name: Deploy

docs/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Dependencies
22
node_modules
3+
/.yarn
34

45
# Production
56
build

docs/.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

docs/blog/2023-02-11-architecture.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: The Architecture so Far!
3+
description: This is the architecture of our app so far.
4+
slug: 2023-02-11-architecture
5+
authors: AbdBarho
6+
tags: [open-assistant]
7+
---
8+
9+
I thought it would make sense to document our architecture as a blog post, since
10+
it would be easily visible for everyone, and it would also be nice to look back
11+
a couple months from now and see how stuff has changed :)
12+
13+
A lot of work was done in the past couple of week to establish the needed
14+
infrastructure both for data collection and inference purposes. Thanks to
15+
everyone, and especially community members who supported us so far!
16+
17+
Our current plan for the architecture of the Open Assistant is as follows:
18+
19+
```mermaid
20+
flowchart TD
21+
subgraph next[Web Frontend]
22+
direction TB
23+
website([Browser]) & nextbackend[Backend] & webpostgres[(PostgreSQL)]
24+
end
25+
26+
subgraph data[Python backend]
27+
direction TB
28+
backend[Backend] & postgres[(PostgreSQL)] & redis[(Redis)]
29+
end
30+
31+
subgraph inference[Inference Service]
32+
direction TB
33+
inferenceServer[Server] -.- infpostgres[(PostgreSQL)]
34+
end
35+
36+
subgraph workers[Inference Workers]
37+
direction TB
38+
worker1[Worker] --- textgen1[Text\ngenerator]
39+
worker2[Worker] --- textgen2[Text\ngenerator]
40+
worker3[Worker] --- textgen3[Text\ngenerator]
41+
end
42+
43+
website --> nextbackend
44+
nextbackend -.- webpostgres
45+
46+
next --- data
47+
48+
backend -.- postgres & redis
49+
50+
next --- inference
51+
52+
inference --- workers
53+
```
54+
55+
We are working on setting up the inference as shown above, and considering our
56+
options for hosting, also, we want to move our authentication from the website
57+
to the python backend.
58+
59+
Of course, this is by no means final, and lot of questions are still open, and
60+
that is the fun of it! If you want to join us on our journey, just give our
61+
[github](https://github.com/LAION-AI/Open-Assistant) a look!

docs/blog/authors.yml

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ yk:
33
title: Project Lead
44
url: https://www.ykilcher.com/
55
image_url: https://www.ykilcher.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fheadshot.ff3a7ee3.webp&w=3840&q=75
6+
AbdBarho:
7+
name: Abdullah Barhoum
8+
title: Semi-professional Döner Enjoyer
9+
image_url: https://avatars.githubusercontent.com/u/24505302?v=4

docs/docusaurus.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ const config = {
2929
defaultLocale: "en",
3030
locales: ["en"],
3131
},
32+
markdown: {
33+
mermaid: true,
34+
},
35+
themes: ["@docusaurus/theme-mermaid"],
3236

3337
presets: [
3438
[

docs/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "^2.3.1",
19-
"@docusaurus/preset-classic": "^2.3.1",
18+
"@docusaurus/core": "2.3.1",
19+
"@docusaurus/preset-classic": "2.3.1",
20+
"@docusaurus/theme-mermaid": "2.3.1",
2021
"@mdx-js/react": "^1.6.22",
2122
"clsx": "^1.2.1",
2223
"docusaurus-preset-openapi": "^0.6.3",
@@ -27,7 +28,7 @@
2728
"url": "^0.11.0"
2829
},
2930
"devDependencies": {
30-
"@docusaurus/module-type-aliases": "^2.3.1",
31+
"@docusaurus/module-type-aliases": "2.3.1",
3132
"@tsconfig/docusaurus": "^1.0.5",
3233
"typescript": "^4.7.4"
3334
},

0 commit comments

Comments
 (0)