mirror of
https://github.com/Sygil-Dev/sygil-webui.git
synced 2024-12-04 17:13:23 +03:00
a9bc7eae19
for more information, see https://pre-commit.ci
45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
#!/bin/bash
|
|
# This file is part of sygil-webui (https://github.com/Sygil-Dev/sygil-webui/).
|
|
|
|
# Copyright 2022 Sygil-Dev team.
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
# Starts the webserver inside the docker container
|
|
#
|
|
|
|
# set -x
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
cd $SCRIPT_DIR
|
|
export PYTHONPATH=$SCRIPT_DIR
|
|
|
|
if [[ $PUBLIC_KEY ]]
|
|
then
|
|
mkdir -p ~/.ssh
|
|
chmod 700 ~/.ssh
|
|
cd ~/.ssh
|
|
echo $PUBLIC_KEY >> authorized_keys
|
|
chmod 700 -R ~/.ssh
|
|
cd /
|
|
service ssh start
|
|
echo "SSH Service Started"
|
|
fi
|
|
|
|
cd $SCRIPT_DIR
|
|
launch_command="streamlit run ${SCRIPT_DIR}/scripts/webui_streamlit.py"
|
|
|
|
$launch_command
|
|
|
|
sleep infinity
|