ff / nv1 /start_server.sh
Qilan2's picture
Update nv1/start_server.sh
67e8c4f verified
raw
history blame
815 Bytes
#!/bin/bash
JUPYTER_TOKEN="${JUPYTER_TOKEN:=qilan}"
source /opt/venv/bin/activate
# nohup python /data/app.py > /data/app.log 2>&1 &
# # nohup python /data/app.py > /dev/null 2>&1 &
# python /data/app.py
if [ "$N_PORT" != "7860" ]; then
nohup python /data/app.py > /data/app.log 2>&1 &
# python /data/b.py
jupyter lab \
--ip=0.0.0.0 \
--port=7860 \
--no-browser \
--allow-root \
--notebook-dir=/data \
--ServerApp.token="$JUPYTER_TOKEN" \
--ServerApp.disable_check_xsrf=True
else
python /data/app.py
# 这里不运行 b.py
fi
# jupyter lab \
# --ip=0.0.0.0 \
# --port=7860 \
# --no-browser \
# --allow-root \
# --notebook-dir=/data \
# --ServerApp.token="$JUPYTER_TOKEN" \
# --ServerApp.disable_check_xsrf=True