plvictor commited on
Commit
b4141f5
·
1 Parent(s): 446e390
Files changed (3) hide show
  1. Dockerfile +3 -3
  2. index.js +1 -1
  3. package.json +28 -0
Dockerfile CHANGED
@@ -10,8 +10,8 @@ RUN apt-get update && apt-get install -y \
10
 
11
  WORKDIR /app
12
 
13
- RUN npm init -y && \
14
- npm install express cors @xenova/transformers
15
 
16
  COPY . .
17
 
@@ -30,6 +30,6 @@ ENV LD_LIBRARY_PATH=/app/textToSpeech/lib:$LD_LIBRARY_PATH
30
  ENV NODE_ENV=production
31
  ENV UV_THREADPOOL_SIZE=16
32
 
33
- EXPOSE 7860
34
 
35
  CMD ["node", "--max-old-space-size=512", "index.js"]
 
10
 
11
  WORKDIR /app
12
 
13
+ COPY package.json .
14
+ RUN npm install
15
 
16
  COPY . .
17
 
 
30
  ENV NODE_ENV=production
31
  ENV UV_THREADPOOL_SIZE=16
32
 
33
+ EXPOSE 2711
34
 
35
  CMD ["node", "--max-old-space-size=512", "index.js"]
index.js CHANGED
@@ -141,7 +141,7 @@ app.post('/api/embed/batch', async (req, res) => {
141
  }
142
  });
143
 
144
- const PORT = process.env.PORT || 7860;
145
 
146
  // Timeout agressivo
147
  const timeout = setTimeout(() => {
 
141
  }
142
  });
143
 
144
+ const PORT = 2711;
145
 
146
  // Timeout agressivo
147
  const timeout = setTimeout(() => {
package.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "plvictor-internal-api",
3
+ "version": "1.0.0",
4
+ "description": "API de TTS (Piper) e Embeddings (E5) para PLVictor",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "start": "node --max-old-space-size=512 index.js",
9
+ "dev": "node index.js"
10
+ },
11
+ "keywords": [
12
+ "tts",
13
+ "embeddings",
14
+ "piper",
15
+ "e5",
16
+ "nlp"
17
+ ],
18
+ "author": "",
19
+ "license": "ISC",
20
+ "dependencies": {
21
+ "express": "^4.18.2",
22
+ "cors": "^2.8.5",
23
+ "@xenova/transformers": "^2.17.1"
24
+ },
25
+ "engines": {
26
+ "node": ">=18.0.0"
27
+ }
28
+ }