优化启动脚本
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Restart Pixelle-Video Web UI on port 8502
|
||||
|
||||
echo "🔄 Restarting Pixelle-Video Web UI on port 8502..."
|
||||
echo ""
|
||||
|
||||
# Check if config.yaml exists
|
||||
if [ ! -f config.yaml ]; then
|
||||
echo "⚠️ config.yaml not found, copying from config.example.yaml..."
|
||||
cp config.example.yaml config.yaml
|
||||
echo "✅ config.yaml created"
|
||||
echo ""
|
||||
echo "📝 Please edit config.yaml and fill in your API keys before using."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Check if port 8502 is in use
|
||||
PORT=8502
|
||||
PID=$(lsof -ti:$PORT)
|
||||
|
||||
if [ ! -z "$PID" ]; then
|
||||
echo "⚠️ Port $PORT is in use by process $PID"
|
||||
echo "🛑 Killing process $PID..."
|
||||
kill -9 $PID
|
||||
sleep 1
|
||||
echo "✅ Process killed"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Start Streamlit in background with nohup
|
||||
echo "🚀 Starting Pixelle-Video Web UI in background..."
|
||||
nohup uv run streamlit run web/app.py --server.port $PORT > nohup.out 2>&1 &
|
||||
|
||||
# Wait a moment and check if the process started
|
||||
sleep 2
|
||||
NEW_PID=$(lsof -ti:$PORT)
|
||||
|
||||
if [ ! -z "$NEW_PID" ]; then
|
||||
echo "✅ Pixelle-Video Web UI started successfully!"
|
||||
echo "📝 Process ID: $NEW_PID"
|
||||
echo "🌐 Access at: http://localhost:$PORT"
|
||||
echo "📄 Logs: nohup.out"
|
||||
else
|
||||
echo "❌ Failed to start Pixelle-Video Web UI"
|
||||
echo "📄 Check nohup.out for error details"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
7
start_web.bat
Normal file
7
start_web.bat
Normal file
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
REM Start Pixelle-Video Web UI
|
||||
echo 🚀 Starting Pixelle-Video Web UI...
|
||||
echo.
|
||||
uv run streamlit run web/app.py
|
||||
|
||||
|
||||
10
start_web.sh
10
start_web.sh
@@ -4,16 +4,6 @@
|
||||
echo "🚀 Starting Pixelle-Video Web UI..."
|
||||
echo ""
|
||||
|
||||
# Check if config.yaml exists
|
||||
if [ ! -f config.yaml ]; then
|
||||
echo "⚠️ config.yaml not found, copying from config.example.yaml..."
|
||||
cp config.example.yaml config.yaml
|
||||
echo "✅ config.yaml created"
|
||||
echo ""
|
||||
echo "📝 Please edit config.yaml and fill in your API keys before using."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Start Streamlit
|
||||
uv run streamlit run web/app.py
|
||||
|
||||
|
||||
Reference in New Issue
Block a user