#!/bin/bash # This file is part of stable-diffusion-webui (https://github.com/sd-webui/stable-diffusion-webui/). # Copyright 2022 sd-webui 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 . # # 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