-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_playlist.sh
36 lines (28 loc) · 943 Bytes
/
make_playlist.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
#!/bin/bash
# Start the Ollama server in the background
echo "Starting Ollama server..."
ollama serve &
# Wait for the Ollama server to fully start
echo "Waiting for Ollama server to initialize..."
sleep 1 # Adjust if needed based on server initialization time
# Execute the Python script
echo "Running img processing script ..."
python3 python_scripts/process_img.py
# Check if the Python script completed successfully
if [ $? -eq 0 ]; then
echo "Image processing completed successfully."
else
echo "Image processing encountered an error." >&2
fi
# Execute the Python script
echo "Running make playlist script..."
python3 python_scripts/make_playlist.py
# Check if the Python script completed successfully
if [ $? -eq 0 ]; then
echo "Make playlist script completed successfully."
else
echo "Make playlist script encountered an error." >&2
fi
# Stop the container
echo "All tasks completed. Exiting container..."
exit 0