diff --git a/ct/jupyter-lab.sh b/ct/jupyter-lab.sh new file mode 100644 index 00000000..7e3b199b --- /dev/null +++ b/ct/jupyter-lab.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2024 itssujee +# Author: itssujee +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ __ __ + __ / /_ _____ __ __/ /____ ____/ / ___ _/ / +/ // / // / _ \/ // / __/ -_) __/ /__/ _ `/ _ \ +\___/\_,_/ .__/\_, /\__/\__/_/ /____/\_,_/_.__/ + /_/ /___/ +EOF +} +header_info +echo -e "Loading..." +APP="jupyter-lab" +var_disk="10" +var_cpu="2" +var_ram="4096" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +start +build_container +description + +cat </root/.jupyter/jupyter_server_config.json +{ + "IdentityProvider": { + "hashed_password": "argon2:\$argon2id\$v=19\$m=10240,t=10,p=8\$OQvpqeCTN7ZtaIuLKVfr9g\$dBp51EMnXw0wmgheJa4pKH3US/ODZaz6LDwlAMdNTAM" + } +} +EOF +cat </etc/systemd/system/jupyterlab.service +[Unit] +Description=Jupyter Lab +[Service] +Type=simple +WorkingDirectory=/root +ExecStart=jupyter lab --ip $IP --port=8080 --no-browser --allow-root +Restart=always +[Install] +WantedBy=multi-user.target +EOF +sudo systemctl daemon-reload +sudo systemctl enable --now jupyterlab.service +msg_ok "Installed JupyterLab" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file