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.
|
||||
"dockerfile": "../Dockerfile"
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/python:1": {
|
||||
"installTools": true,
|
||||
"version": "3.10"
|
||||
}
|
||||
}
|
||||
// "features": {
|
||||
// "ghcr.io/devcontainers/features/python:1": {
|
||||
// "installTools": true,
|
||||
// "version": "3.10"
|
||||
// }
|
||||
// },
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
"forwardPorts": [8080, 8081],
|
||||
|
||||
// Uncomment the next line to run commands after the container is created.
|
||||
// "postCreateCommand": "cat /etc/os-release",
|
||||
//"postCreateCommand": "npm install"
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "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
|
||||
FROM node:current-alpine
|
||||
# current-alpine
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
# RUN npm install -g npm@9.6.2
|
||||
ENV NODE_ENV=demo
|
||||
|
||||
# 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*", "./"]
|
||||
# RUN npm install --production --silent
|
||||
# && mv node_modules ../
|
||||
COPY . .
|
||||
RUN npm install
|
||||
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",
|
||||
"main": "web/server.js",
|
||||
"scripts": {
|
||||
"start": "node /app/web/server.js"
|
||||
"start": "node web/server.js",
|
||||
"start:demo": "NODE_ENV=demo node web/server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "^1.20.2",
|
||||
// "dalai": "^0.2.50",
|
||||
"dotenv": "^16.0.3",
|
||||
"express": "^4.18.2",
|
||||
"git": "^0.1.5",
|
||||
"node-persist": "^3.1.3",
|
||||
"request": "^2.88.2",
|
||||
// "webtorrent": "^2.0.14",
|
||||
"ws": "^8.12.1"
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,9 @@ if (require('dotenv')) {
|
||||
require('dotenv').config()
|
||||
}
|
||||
|
||||
console.log('Starting ws server on port '+ process.env.SERVER_PORT_WS);
|
||||
const WebSocket = require('ws');
|
||||
const wss = new WebSocket.Server({ port: process.env.SERVER_PORT_WS });
|
||||
console.log('WebSocket server started on port 8081');
|
||||
|
||||
|
||||
console.log(process.env)
|
||||
|
Loading…
x
Reference in New Issue
Block a user