multiple AI projects changes:
TTS and WebUI related
This commit is contained in:
parent
ba9389e7b0
commit
2657f02455
@ -10,25 +10,30 @@
|
|||||||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
||||||
"dockerfile": "../Dockerfile"
|
"dockerfile": "../Dockerfile"
|
||||||
},
|
},
|
||||||
"features": {
|
// "features": {
|
||||||
"ghcr.io/devcontainers/features/python:1": {
|
// "ghcr.io/devcontainers/features/python:1": {
|
||||||
"installTools": true,
|
// "installTools": true,
|
||||||
"version": "3.10"
|
// "version": "3.10"
|
||||||
}
|
// }
|
||||||
}
|
// },
|
||||||
|
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
// "features": {},
|
// "features": {},
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
|
"forwardPorts": [8080, 8081],
|
||||||
|
|
||||||
// Uncomment the next line to run commands after the container is created.
|
// Uncomment the next line to run commands after the container is created.
|
||||||
// "postCreateCommand": "cat /etc/os-release",
|
// "postCreateCommand": "cat /etc/os-release",
|
||||||
|
//"postCreateCommand": "npm install"
|
||||||
|
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
// "customizations": {},
|
// "customizations": {},
|
||||||
|
|
||||||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
|
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
|
||||||
// "remoteUser": "devcontainer"
|
// "remoteUser": "devcontainer"
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": "/bin/bash"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
10
.env
Normal file
10
.env
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
TTS_BACKEND_URL=http://192.168.0.10:9008/asr
|
||||||
|
#TTS_BACKEND_URL=http://localhost:9001/asr #gpu 9002-cpu
|
||||||
|
TTS_BACKEND_URL2=http://localhost:9002/asr
|
||||||
|
TTS_BACKEND_URL3=http://192.168.0.10:9008/asr #gpu
|
||||||
|
TTS_BACKEND_URL4=http://192.168.0.10:9009/asr #cpu 9008-gpu
|
||||||
|
WS_URL=ws://localhost:8081
|
||||||
|
SERVER_PORT_WS=8081
|
||||||
|
SERVER_PORT_HTTP=8080
|
6
.env.demo
Normal file
6
.env.demo
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
TTS_BACKEND_URL=http://192.168.0.10:9008/asr
|
||||||
|
WS_URL=ws://192.168.0.10:9008:8081
|
||||||
|
SERVER_PORT_WS=8081
|
||||||
|
SERVER_PORT_HTTP=8080
|
19
Dockerfile
19
Dockerfile
@ -56,18 +56,23 @@
|
|||||||
# oriiginal
|
# oriiginal
|
||||||
FROM node:current-alpine
|
FROM node:current-alpine
|
||||||
# current-alpine
|
# current-alpine
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=demo
|
||||||
WORKDIR /app
|
|
||||||
# RUN npm install -g npm@9.6.2
|
|
||||||
# RUN apk update && apk add bash
|
# RUN apk update && apk add bash
|
||||||
|
RUN apk update && apk add git
|
||||||
|
RUN npm install -g npm@latest
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
|
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
|
||||||
# RUN npm install --production --silent
|
# RUN npm install --production --silent
|
||||||
# && mv node_modules ../
|
# && mv node_modules ../
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN npm install
|
||||||
EXPOSE 8080 8081
|
EXPOSE 8080 8081
|
||||||
RUN chown -R node /app
|
|
||||||
|
|
||||||
# RUN npm install dalai
|
#RUN chown -R node /app
|
||||||
|
#USER node
|
||||||
|
|
||||||
USER node
|
# CMD ["npm", "start"]
|
||||||
CMD ["npm", "start"]
|
|
||||||
|
CMD ["npm", "run", "start:demo"]
|
3851
package-lock.json
generated
3851
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,17 +3,16 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "web/server.js",
|
"main": "web/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node /app/web/server.js"
|
"start": "node web/server.js",
|
||||||
|
"start:demo": "NODE_ENV=demo node web/server.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.20.2",
|
"body-parser": "^1.20.2",
|
||||||
// "dalai": "^0.2.50",
|
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"git": "^0.1.5",
|
"git": "^0.1.5",
|
||||||
"node-persist": "^3.1.3",
|
"node-persist": "^3.1.3",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
// "webtorrent": "^2.0.14",
|
|
||||||
"ws": "^8.12.1"
|
"ws": "^8.12.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,10 @@
|
|||||||
<div class="flex justify-center items-center mb-4">
|
<div class="flex justify-center items-center mb-4">
|
||||||
<span id="record-actions">
|
<span id="record-actions">
|
||||||
<button id="record-button"
|
<button id="record-button"
|
||||||
disabled
|
disabled
|
||||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mr-4">
|
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mr-4">
|
||||||
Start Recording</button>
|
Start Recording</button>
|
||||||
<button id="record-button-speakers"
|
<button id="record-button-speakers"
|
||||||
disabled
|
disabled
|
||||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mr-4">
|
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mr-4">
|
||||||
Stream from speakers</button>
|
Stream from speakers</button>
|
||||||
|
@ -3,9 +3,9 @@ if (require('dotenv')) {
|
|||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('Starting ws server on port '+ process.env.SERVER_PORT_WS);
|
||||||
const WebSocket = require('ws');
|
const WebSocket = require('ws');
|
||||||
const wss = new WebSocket.Server({ port: process.env.SERVER_PORT_WS });
|
const wss = new WebSocket.Server({ port: process.env.SERVER_PORT_WS });
|
||||||
console.log('WebSocket server started on port 8081');
|
|
||||||
|
|
||||||
|
|
||||||
console.log(process.env)
|
console.log(process.env)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user