-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
34 lines (34 loc) · 1.34 KB
/
config.yaml
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
remote_port: '8188' #leave empty to disable port fowarding
local_port: '8188' #leave empty to disable port fowarding
region: 'eu-north-1'
availability_zone: 'eu-north-1c'
ami: 'ami-00ca6e75d45510046'
instance_type: 'g5.4xlarge'
key_name: 'sd-north'
security_groups:
- 'sg-0a2f9548b660b5d0a'
tag_key: 'sd'
tag_value: 'sd'
iam_instance_profile: 'arn:aws:iam::702712055786:instance-profile/aws-ssm-agent-for-sd'
max_spot_price: "0.7"
user_data: |
#!/bin/bash
# Define an array of directories
declare -a dirs=(
"/home/ubuntu/kohya_ss"
"/home/ubuntu/stable-diffusion-webui"
"/home/ubuntu/ComfyUI"
)
# Define log file
LOGFILE="/home/ubuntu/git-pull.log"
# Loop through the directories
for dir in "${dirs[@]}"; do
if [ -d "$dir" ]; then
if git -C "$dir" rev-parse --is-inside-work-tree > /dev/null 2>&1; then
git -C "$dir" pull >> "$LOGFILE" 2>&1
fi
fi
done
# Pull updates for extensions and custom nodes:
find /home/ubuntu/stable-diffusion-webui/extensions -maxdepth 1 -type d -exec sh -c 'cd {} && git rev-parse --is-inside-work-tree > /dev/null 2>&1 && git pull >> /home/ubuntu/git-pull.log 2>&1' \;
find /home/ubuntu/ComfyUI/custom_nodes -maxdepth 1 -type d -exec sh -c 'cd {} && git rev-parse --is-inside-work-tree > /dev/null 2>&1 && git pull >> /home/ubuntu/git-pull.log 2>&1' \;