Ai
1 Star 1 Fork 0

gitee/jupyterhub-deploy-docker-localhost

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
get_service_host_ip.sh 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
Herman Tolentino 提交于 2021-09-28 10:21 +08:00 . updated scripts
#!/bin/bash
# revised 2021-09-27
# maintainer: herman.tolentino@gmail.com
# --------------------------------------
# purpose: obtain JupyterHub Service Host
# IP Address and update the
# JUPYTERHUB_SERVICE_HOST_IP
# value in the .env file
# --------------------------------------
FILE='/tmp/jupyterhub_host_ip'
if [ -f $FILE ]; then
rm $FILE
else
touch $FILE
fi
unset JUPYTERHUB_SERVICE_HOST_IP
echo "JUPYTERHUB_SSL = $JUPYTERHUB_SSL"
case $JUPYTERHUB_SSL in
no_ssl)
echo "Starting up JupyterHub..."
docker-compose up -d
;;
use_ssl_ss)
echo "Starting up JupyterHub..."
docker-compose up -d
;;
use_ssl_le)
echo "Starting up JupyterHub-LetsEncrypt..."
docker-compose -f docker-compose-letsencrypt.yml up -d
;;
esac
docker inspect --format "{{ .NetworkSettings.Networks.jupyterhubnet.IPAddress }}" jupyterhub >> /tmp/jupyterhub_host_ip
bash ./stophub.sh
echo 'Set Jupyterhub Host IP:'
REPLACE_LINE="JUPYTERHUB_SERVICE_HOST_IP=`cat /tmp/jupyterhub_host_ip`"
echo "$REPLACE_LINE"
sed "s#.*JUPYTERHUB_SERVICE_HOST_IP.*#$REPLACE_LINE#g" .env > /tmp/envfile
cat /tmp/envfile > .env
rm /tmp/envfile
echo "Starting up JupyterHub"
bash ./starthub.sh
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Microbion/jupyterhub-deploy-docker-localhost.git
git@gitee.com:Microbion/jupyterhub-deploy-docker-localhost.git
Microbion
jupyterhub-deploy-docker-localhost
jupyterhub-deploy-docker-localhost
master

搜索帮助