Spaces:
Running
Running
Merge pull request #125 from jhj0517/feature/shell-script
Browse files- .github/workflows/shell-scrpit-test.yml +0 -1
- Install.sh +17 -0
- start-webui.sh +11 -0
.github/workflows/shell-scrpit-test.yml
CHANGED
|
@@ -33,7 +33,6 @@ jobs:
|
|
| 33 |
./Install.sh
|
| 34 |
|
| 35 |
- name: 'Execute start-webui.sh'
|
| 36 |
-
shell: bash
|
| 37 |
run: |
|
| 38 |
chmod +x ./start-webui.sh
|
| 39 |
timeout 60s ./start-webui.sh || true
|
|
|
|
| 33 |
./Install.sh
|
| 34 |
|
| 35 |
- name: 'Execute start-webui.sh'
|
|
|
|
| 36 |
run: |
|
| 37 |
chmod +x ./start-webui.sh
|
| 38 |
timeout 60s ./start-webui.sh || true
|
Install.sh
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
if [ ! -d "venv" ]; then
|
| 4 |
+
echo "Creating virtual environment..."
|
| 5 |
+
python -m venv venv
|
| 6 |
+
fi
|
| 7 |
+
|
| 8 |
+
source venv/bin/activate
|
| 9 |
+
|
| 10 |
+
pip install -r requirements.txt && echo "Requirements installed successfully." || {
|
| 11 |
+
echo ""
|
| 12 |
+
echo "Requirements installation failed. Please remove the venv folder and run the script again."
|
| 13 |
+
deactivate
|
| 14 |
+
exit 1
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
deactivate
|
start-webui.sh
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
PYTHON="./venv/bin/python"
|
| 4 |
+
echo "venv ${PYTHON}"
|
| 5 |
+
echo ""
|
| 6 |
+
|
| 7 |
+
$PYTHON ./app.py
|
| 8 |
+
|
| 9 |
+
echo "launching the app"
|
| 10 |
+
|
| 11 |
+
deactivate
|