Skip to content

feat: OneKeyStart.bat 增强启动器 - 预检诊断 + 日志记录#532

Merged
Huanshere merged 1 commit intoHuanshere:mainfrom
doomsday616:feat/enhanced-launcher
Mar 10, 2026
Merged

feat: OneKeyStart.bat 增强启动器 - 预检诊断 + 日志记录#532
Huanshere merged 1 commit intoHuanshere:mainfrom
doomsday616:feat/enhanced-launcher

Conversation

@doomsday616
Copy link

Summary

Enhanced OneKeyStart.bat with a Python-based pre-flight check system (launch.py) that validates the environment before launching Streamlit. Silently logs diagnostics to logs/ — only shows output when problems are detected.

增强 OneKeyStart.bat,新增 Python 启动器 launch.py,在启动 Streamlit 前自动检查环境。诊断信息静默写入 logs/ 目录,只在检测到问题时才在屏幕上显示。


What it checks / 检查项

Check On failure
streamlit installed ERROR - blocks startup
json_repair installed ERROR - blocks startup
torch + CUDA available WARN - continues (CPU fallback)
whisperx installed WARN - continues
ffmpeg in PATH ERROR - blocks startup
Port 8501 available WARN - continues

Behavior / 行为

  • Everything OK → zero console output, straight into Streamlit (same as original)
  • Warnings (no CUDA, etc.) → 1-2 line warnings, continues startup
  • Blocking errors (missing packages, no ffmpeg) → shows errors, stops with guidance
  • All diagnostics silently logged to logs/startup_YYYYMMDD_HHMMSS.log
  • Suppresses noisy Python/Streamlit warnings (pynvml FutureWarning, use_container_width deprecation)

一切正常时屏幕零输出,直接进 Streamlit。有问题才显示。所有诊断写入日志文件。

Files changed / 改动文件

File Change
OneKeyStart.bat Calls launch.py instead of directly running streamlit; suppresses Python warnings
launch.py New - Pre-flight checks + Streamlit launcher with logging
.gitignore Added logs/
docs/pages/docs/start.zh-CN.md Fixed: 一键启动.batOneKeyStart.bat
docs/pages/docs/start.en-US.md Added OneKeyStart.bat mention in step 4

Testing / 测试

Tested on Windows 11 by double-clicking OneKeyStart.bat:

  • ✅ conda activate works correctly
  • ✅ All checks pass silently
  • ✅ Streamlit launches with clean output
  • ✅ Log file created in logs/
  • ✅ Warnings suppressed (pynvml, use_container_width)

@Huanshere Huanshere merged commit 29e240d into Huanshere:main Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants