Fix CUDA OOM by mutually unloading Whisper and ChatTTS on 8GB GPU.
Release GPU memory before TTS/ASR switches, lower TTS token limits, and set PYTORCH_CUDA_ALLOC_CONF in PM2. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+32
-31
@@ -1,31 +1,32 @@
|
||||
/**
|
||||
* PM2 进程守护配置
|
||||
* 标准安装路径: /opt/Trading_Studio
|
||||
* 用法: pm2 start ecosystem.config.js
|
||||
*/
|
||||
const path = require("path");
|
||||
|
||||
const APP_DIR = __dirname;
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "trading_studio",
|
||||
script: path.join(APP_DIR, "app.py"),
|
||||
interpreter: path.join(APP_DIR, "venv/bin/python"),
|
||||
cwd: APP_DIR,
|
||||
instances: 1,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: "6G",
|
||||
env: {
|
||||
PYTHONUNBUFFERED: "1",
|
||||
CUDA_VISIBLE_DEVICES: "0",
|
||||
},
|
||||
error_file: path.join(APP_DIR, "logs/pm2-error.log"),
|
||||
out_file: path.join(APP_DIR, "logs/pm2-out.log"),
|
||||
log_date_format: "YYYY-MM-DD HH:mm:ss",
|
||||
merge_logs: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
/**
|
||||
* PM2 进程守护配置
|
||||
* 标准安装路径: /opt/Trading_Studio
|
||||
* 用法: pm2 start ecosystem.config.js
|
||||
*/
|
||||
const path = require("path");
|
||||
|
||||
const APP_DIR = __dirname;
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "trading_studio",
|
||||
script: path.join(APP_DIR, "app.py"),
|
||||
interpreter: path.join(APP_DIR, "venv/bin/python"),
|
||||
cwd: APP_DIR,
|
||||
instances: 1,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: "6G",
|
||||
env: {
|
||||
PYTHONUNBUFFERED: "1",
|
||||
CUDA_VISIBLE_DEVICES: "0",
|
||||
PYTORCH_CUDA_ALLOC_CONF: "expandable_segments:True",
|
||||
},
|
||||
error_file: path.join(APP_DIR, "logs/pm2-error.log"),
|
||||
out_file: path.join(APP_DIR, "logs/pm2-out.log"),
|
||||
log_date_format: "YYYY-MM-DD HH:mm:ss",
|
||||
merge_logs: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user