Langchain-Chatchat/tools/autodl_start_script/start_chatchat.sh

21 lines
504 B
Bash
Raw Normal View History

2024-12-20 16:04:03 +08:00
#!/bin/bash
conda run -n chatchat --no-capture-output export CHATCHAT_ROOT=/root/chatchat-data && chatchat start -a > >(tee chatchat-output.log) 2>&1 &
PID=$!
echo "Started chatchat with PID $PID"
echo "Checking if output.log has content..."
while [ ! -s chatchat-output.log ]; do
echo "Waiting for output to appear in chatchat-output.log..."
sleep 1
done
while ! grep -q "URL: http://0.0.0.0:6006" chatchat-output.log; do
sleep 1
done
echo $PID > chatchat.pid
echo "chatchat started"