-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTART_LINUX.sh
More file actions
executable file
·49 lines (35 loc) · 936 Bytes
/
Copy pathSTART_LINUX.sh
File metadata and controls
executable file
·49 lines (35 loc) · 936 Bytes
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
#!/bin/bash
mgc() {
echo "###############################"
echo "# Music Genre Classifier 2025 #"
echo "###############################"
}
if [[ $EUID -ne 0 ]]; then
echo "Ten skrypt musi być uruchomiony jako root."
exit 1
fi
cd "$(dirname "$0")" || exit 1
mgc
if ! docker info > /dev/null 2>&1; then
echo "Przed uruchomieniem programu należy zainstalować Docker i Docker-Compose."
read -p "Naciśnij Enter, aby kontynuować..."
exit 1
fi
echo "Trwa uruchamianie programu..."
if ! docker image inspect music-genre-classifier-app:latest > /dev/null 2>&1; then
echo "Pierwsze uruchomienie może potrwać kilka minut"
echo "NIE ZAMYKAJ TEGO OKNA!"
fi
cleanup() {
docker compose down
exit 0
}
trap cleanup EXIT SIGINT SIGTERM SIGHUP
docker compose up -d
clear
sleep 3
mgc
echo "Otwórz przeglądarkę i przejdź pod adres: http://127.0.0.1:8080"
while true; do
sleep 60
done