Skip to content

Commit f67304f

Browse files
authored
Merge pull request #375 from open-edge-platform/update-branch
Edge AI Demo Studio: Implement multiserve backend (#930)
2 parents 78f33ff + f8b6b30 commit f67304f

290 files changed

Lines changed: 23808 additions & 13562 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

usecases/ai/edge-ai-demo-studio/.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Python environment
22
.venv
33
__pycache__
4+
.cache
45

56
# Payload cache
67
/frontend/.env
@@ -11,15 +12,15 @@ __pycache__
1112
# Thirdparty
1213
/thirdparty/
1314
/workers/thirdparty
14-
/workers/embedding/thirdparty
15+
/workers/embeddings/thirdparty
1516
/workers/text-generation/thirdparty
1617
/workers/text-to-speech/kokoro/thirdparty
1718
/workers/lipsync/modules/lipsync/wav2lip/wav2lip256
1819
/workers/lipsync/data/avatars
1920
/workers/lipsync/models
2021
/workers/lipsync/build
2122

22-
/workers/embedding/data
23+
/workers/embeddings/data
2324
/workers/wake-word-detection/data
2425

2526
/models

usecases/ai/edge-ai-demo-studio/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
Edge AI Demo Studio is a modern toolkit for deploying, managing, and serving AI models on edge platforms. It features a web-based UI for device, workload, and user management, and is optimized for Intel hardware and edge environments.
77

8+
![Demo](./docs/demo.gif)
89

910
## Features
1011

@@ -114,4 +115,4 @@ See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for deployment guidelines.
114115

115116
**Q: Why is Electron Skipped by default**
116117

117-
This is because Electron is being used to create a packaged release only. If you need a packaged release, please refer to [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md)
118+
This is because Electron is being used to create a packaged release only. If you need a packaged release, please refer to [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md)
14.5 MB
Loading

usecases/ai/edge-ai-demo-studio/frontend/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,3 @@ yarn-error.log*
3939
# typescript
4040
*.tsbuildinfo
4141
next-env.d.ts
42-
43-
data
Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,63 @@
11
// Copyright (C) 2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import { FlatCompat } from '@eslint/eslintrc'
4+
import { FlatCompat } from "@eslint/eslintrc";
55

66
const compat = new FlatCompat({
77
// import.meta.dirname is available after Node.js v20.11.0
88
baseDirectory: import.meta.dirname,
9-
})
9+
});
1010

1111
const eslintConfig = [
12+
{
13+
ignores: ["src/app/(payload)/admin", "eslint.config.mjs"],
14+
},
1215
...compat.config({
1316
extends: [
14-
'next',
15-
'next/core-web-vitals',
16-
'next/typescript',
17-
'plugin:prettier/recommended',
18-
'plugin:jsx-a11y/recommended',
17+
"next",
18+
"next/core-web-vitals",
19+
"next/typescript",
20+
"plugin:prettier/recommended",
21+
"plugin:jsx-a11y/recommended",
1922
],
20-
plugins: ['prettier', 'jsx-a11y'],
23+
plugins: ["prettier", "jsx-a11y"],
2124
rules: {
22-
'prettier/prettier': [
23-
'error',
25+
"no-console": "error",
26+
"prettier/prettier": [
27+
"error",
2428
{
25-
trailingComma: 'all',
29+
trailingComma: "all",
2630
semi: false,
2731
tabWidth: 2,
2832
singleQuote: true,
2933
printWidth: 80,
30-
endOfLine: 'auto',
31-
arrowParens: 'always',
32-
plugins: ['prettier-plugin-tailwindcss'],
34+
endOfLine: "auto",
35+
arrowParens: "always",
36+
plugins: ["prettier-plugin-tailwindcss"],
3337
},
3438
{
3539
usePrettierrc: false,
3640
},
3741
],
38-
'react/react-in-jsx-scope': 'off',
39-
'jsx-a11y/media-has-caption': 'off',
40-
'jsx-a11y/alt-text': 'warn',
41-
'jsx-a11y/aria-props': 'warn',
42-
'jsx-a11y/aria-proptypes': 'warn',
43-
'jsx-a11y/aria-unsupported-elements': 'warn',
44-
'jsx-a11y/role-has-required-aria-props': 'warn',
45-
'jsx-a11y/role-supports-aria-props': 'warn',
46-
'@typescript-eslint/naming-convention': [
47-
'error',
42+
"react/react-in-jsx-scope": "off",
43+
"jsx-a11y/media-has-caption": "off",
44+
"jsx-a11y/alt-text": "warn",
45+
"jsx-a11y/aria-props": "warn",
46+
"jsx-a11y/aria-proptypes": "warn",
47+
"jsx-a11y/aria-unsupported-elements": "warn",
48+
"jsx-a11y/role-has-required-aria-props": "warn",
49+
"jsx-a11y/role-supports-aria-props": "warn",
50+
"@typescript-eslint/naming-convention": [
51+
"error",
4852
{
49-
selector: 'variableLike',
50-
format: ['UPPER_CASE', 'camelCase', 'PascalCase'],
51-
leadingUnderscore: 'allow',
52-
trailingUnderscore: 'forbid',
53+
selector: "variableLike",
54+
format: ["UPPER_CASE", "camelCase", "PascalCase"],
55+
leadingUnderscore: "allow",
56+
trailingUnderscore: "forbid",
5357
},
5458
],
5559
},
5660
}),
57-
]
61+
];
5862

59-
export default eslintConfig
63+
export default eslintConfig;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@5/schema.json",
3+
"ignoreExportsUsedInFile": {
4+
"interface": true,
5+
"type": true
6+
},
7+
"tags": [
8+
"-lintignore"
9+
],
10+
"ignore": [
11+
"src/components/ui/**"
12+
]
13+
}

usecases/ai/edge-ai-demo-studio/frontend/next.config.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,31 @@
33

44
import type { NextConfig } from 'next'
55
import { withPayload } from '@payloadcms/next/withPayload'
6+
import withBundleAnalyzer from '@next/bundle-analyzer'
67
import {
78
LIPSYNC_PORT,
89
EMBEDDING_PORT,
910
SPEECH_TO_TEXT_PORT,
1011
TEXT_TO_SPEECH_PORT,
1112
IMAGE_GENERATION_PORT,
1213
WAKE_WORD_DETECTION_PORT,
14+
TEXT_GENERATION_PORT,
1315
} from '@/lib/constants'
1416

17+
const bundleAnalyzer = withBundleAnalyzer({
18+
enabled: process.env.ANALYZE === 'true',
19+
})
20+
1521
const nextConfig: NextConfig = {
1622
devIndicators: false,
1723
output: 'standalone',
18-
serverExternalPackages: ['openvino-node'],
1924
outputFileTracingIncludes: {
2025
'/': ['./node_modules/@libsql/win32-x64-msvc/**/*'],
2126
},
2227
experimental: {
2328
proxyTimeout: 1000 * 120, // 120 seconds
2429
},
25-
webpack: (config, { isServer }) => {
26-
if (!isServer) {
27-
config.externals = [
28-
...config.externals,
29-
{ 'openvino-node': 'commonjs openvino-node' },
30-
]
31-
}
30+
webpack: (config) => {
3231
return config
3332
},
3433
async redirects() {
@@ -43,19 +42,23 @@ const nextConfig: NextConfig = {
4342
async rewrites() {
4443
return [
4544
{
46-
source: '/api/stt/v1/:slug*',
47-
destination: `http://localhost:${SPEECH_TO_TEXT_PORT}/v1/:slug*`,
45+
source: `/api/text-generation/:slug*`,
46+
destination: `http://localhost:${TEXT_GENERATION_PORT}/:slug*`,
47+
},
48+
{
49+
source: `/api/speech-to-text/:slug*`,
50+
destination: `http://localhost:${SPEECH_TO_TEXT_PORT}/:slug*`,
4851
},
4952
{
50-
source: '/api/embeddings/v1/:slug*',
51-
destination: `http://localhost:${EMBEDDING_PORT}/v1/:slug*`,
53+
source: `/api/embeddings/:slug*`,
54+
destination: `http://localhost:${EMBEDDING_PORT}/:slug*`,
5255
},
5356
{
54-
source: '/api/tts/v1/:slug*',
55-
destination: `http://localhost:${TEXT_TO_SPEECH_PORT}/v1/:slug*`,
57+
source: `/api/text-to-speech/:slug*`,
58+
destination: `http://localhost:${TEXT_TO_SPEECH_PORT}/:slug*`,
5659
},
5760
{
58-
source: '/api/lipsync/:slug*',
61+
source: `/api/lipsync/:slug*`,
5962
destination: `http://localhost:${LIPSYNC_PORT}/:slug*`,
6063
},
6164
{
@@ -70,4 +73,4 @@ const nextConfig: NextConfig = {
7073
},
7174
}
7275

73-
export default withPayload(nextConfig)
76+
export default bundleAnalyzer(withPayload(nextConfig))

0 commit comments

Comments
 (0)