-
Notifications
You must be signed in to change notification settings - Fork 0
/
start-ssh-only.sh
56 lines (43 loc) · 1.29 KB
/
start-ssh-only.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
echo "pod started"
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
fi
/comfyui-on-workspace.sh
/ai-toolkit-on-workspace.sh
#!/bin/bash
if [[ -z "${HF_TOKEN}" ]] || [[ "${HF_TOKEN}" == "enter_your_huggingface_token_here" ]]
then
echo "HF_TOKEN is not set"
else
echo "HF_TOKEN is set, logging in..."
huggingface-cli login --token ${HF_TOKEN}
fi
# Start nginx as reverse proxy to enable api access
service nginx start
# Start JupyterLab
jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.allow_origin='*' --NotebookApp.token=$JUPYTER_TOKEN --ServerApp.preferred_dir=/workspace &
echo "JupyterLab started"
# # Check if the flux model is present
# bash /check_files.sh
# Check if there is a venv directory, if so, activate it
if [ -d "/workspace/venv" ]; then
echo "venv directory found, activating it"
source /workspace/venv/bin/activate
fi
# Check if user's script exists in /workspace
if [ ! -f /workspace/start_user.sh ]; then
# If not, copy the original script to /workspace
cp /start-original.sh /workspace/start_user.sh
fi
# Execute the user's script
bash /workspace/start_user.sh
/download-all.sh
sleep infinity