nodebookls/start_all.bat
2025-10-29 13:56:24 +08:00

64 lines
1.7 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM TXT版轻量NotebookLM一键启动脚本 (Windows)
REM 同时启动Redis, Celery Worker和主应用
echo ==========================================
echo TXT版轻量NotebookLM一键启动脚本
echo ==========================================
REM 检查是否安装了Python
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo 错误: 未找到Python请先安装Python
pause
exit /b 1
)
REM 检查是否安装了pip
pip --version >nul 2>&1
if %errorlevel% neq 0 (
echo 错误: 未找到pip请先安装pip
pause
exit /b 1
)
REM 检查是否存在requirements.txt
if not exist "requirements.txt" (
echo 错误: 未找到requirements.txt文件
pause
exit /b 1
)
REM 安装依赖
echo 正在安装依赖...
pip install -r requirements.txt >nul 2>&1
REM 检查是否存在.env文件
if not exist ".env" (
echo 警告: 未找到.env文件请复制.env.example并配置相关参数
)
REM 尝试启动Redis服务器 (假设已安装)
echo 正在尝试启动Redis服务器...
start /min cmd /c "redis-server || echo Redis启动失败或已在运行"
timeout /t 3 /nobreak >nul
REM 启动Celery Worker
echo 正在启动Celery Worker...
start "Celery Worker" /min cmd /c "celery -A celery_app worker --loglevel=info || echo Celery启动失败"
timeout /t 5 /nobreak >nul
REM 启动应用
echo 正在启动主应用...
echo 请在浏览器中访问 http://localhost:8000
start "NotebookLM App" cmd /c "python main.py || echo 主应用启动失败"
echo ==========================================
echo 所有服务启动命令已发送
echo 请等待几秒钟让服务完全启动
echo 访问地址: http://localhost:8000
echo ==========================================
pause