generated from szaimen/aio-fail2ban
-
Notifications
You must be signed in to change notification settings - Fork 3
/
start.sh
38 lines (33 loc) · 930 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
33
34
35
36
37
38
#!/bin/bash
echo "CPU info:"
grep -e "model\sname" /proc/cpuinfo | head -1
grep -e "flags" /proc/cpuinfo | head -1
if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK"
else
echo "CPU: no AVX found"
fi
if grep -q -e "\savx2\s" /proc/cpuinfo ; then
echo "CPU: AVX2 found OK"
else
echo "CPU: no AVX2 found"
fi
if grep -q -e "\savx512" /proc/cpuinfo ; then
echo "CPU: AVX512 found OK"
else
echo "CPU: no AVX512 found"
fi
while ! nc -z nextcloud-aio-nextcloud 9001; do
echo "Waiting for nextcloud to start"
sleep 5
done
while ! [ -f /nextcloud/admin/files/nextcloud-aio-local-ai/models.yaml ]; do
echo "Waiting for nextcloud-aio-local-ai/models.yaml file to be created"
sleep 5
done
# Set Threads automatically
set -x
THREADS="$(nproc)"
export THREADS
set +x
./local-ai --preload-models-config "/nextcloud/admin/files/nextcloud-aio-local-ai/models.yaml"