forked from armarce/automatic1111-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
32 lines (28 loc) · 782 Bytes
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo "Container Started"
export PYTHONUNBUFFERED=1
source /workspace/venv/bin/activate
cd /workspace/stable-diffusion-webui
python relauncher.py &
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
if [[ $JUPYTER_PASSWORD ]]
then
ln -sf /examples /workspace
ln -sf /root/welcome.ipynb /workspace
cd /
jupyter lab --allow-root --no-browser --port=8888 --ip=* \
--ServerApp.terminado_settings='{"shell_command":["/bin/bash"]}' \
--ServerApp.token=$JUPYTER_PASSWORD --ServerApp.allow_origin=* --ServerApp.preferred_dir=/workspace
echo "Jupyter Lab Started"
fi
sleep infinity