代码拉取完成,页面将自动刷新
#!/bin/bash
pidfile=/tmp/jupyter_qtconsole.pid
use_xvfb=1
if [[ x$1 != x ]]
then
use_xvfb=$1
fi
# if [[ x$use_xvfb == 1 ]]
# then
# pid=`ps a | grep "Xvfb" | grep ":$DISPLAY_ID" | cut -d\ -f2`
#
# if [[ x$pid == x ]]
# then
# Xvfb :$DISPLAY_ID -ac -screen 0 640x480x8 &
# sleep 1
# fi
# fi
if [ ! -f $pidfile ]
then
touch $pidfile
fi
pid=`cat $pidfile`
if [[ x$pid != x ]]
then
ret=`ps -p $pid | tail -n 1 | grep qt`
if [[ x$ret != x ]]
then
kill -9 $pid
fi
fi
if [[ x$use_xvfb == x1 ]]
then
xvfb-run -a -s "-screen 0 300x300x8" jupyter qtconsole --no-confirm-exit --no-banner >/dev/null 2>&1 &
else
jupyter qtconsole --no-confirm-exit --no-banner >/dev/null 2>&1 &
fi
echo "$!" > $pidfile
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。