Skip to content

Commit

Permalink
Merge pull request #125 from jhj0517/feature/shell-script
Browse files Browse the repository at this point in the history
Add shell script
  • Loading branch information
jhj0517 authored Apr 1, 2024
2 parents 7f2074d + 140b23e commit 70d794a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/shell-scrpit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
./Install.sh
- name: 'Execute start-webui.sh'
shell: bash
run: |
chmod +x ./start-webui.sh
timeout 60s ./start-webui.sh || true
Expand Down
17 changes: 17 additions & 0 deletions Install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python -m venv venv
fi

source venv/bin/activate

pip install -r requirements.txt && echo "Requirements installed successfully." || {
echo ""
echo "Requirements installation failed. Please remove the venv folder and run the script again."
deactivate
exit 1
}

deactivate
11 changes: 11 additions & 0 deletions start-webui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

PYTHON="./venv/bin/python"
echo "venv ${PYTHON}"
echo ""

$PYTHON ./app.py

echo "launching the app"

deactivate

0 comments on commit 70d794a

Please sign in to comment.