-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fc353b
commit b56c8a6
Showing
1 changed file
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
#!/bin/bash | ||
|
||
repo_url="https://github.com/lllyasviel/Fooocus.git" | ||
repo_url="https://github.com/lllyasviel/Fooocus/archive/refs/tags/" | ||
fooocus_version="2.3.1" | ||
fooocus_tar="/app/Fooocus/Fooocus-${fooocus_version}.tar.gz" | ||
|
||
if [ ! -e /app/fooocus/entry_with_update.py ]; then | ||
echo "Script file does not exist. Cloning..." | ||
if ! git clone "$repo_url" /app/fooocus; then | ||
echo "Failed to clone repo" | ||
exit 1 | ||
fi | ||
if [ ! -d "/app/Fooocus" ]; then | ||
mkdir -p /app/Fooocus | ||
fi | ||
|
||
if [ ! -e /app/venv ]; then | ||
echo "Venv does not exist. Creating..." | ||
if ! virtualenv /app/venv; then | ||
echo "Failed to venv" | ||
exit 1 | ||
fi | ||
if ! curl -fSL "${repo_url}${fooocus_version}.tar.gz" -o "${fooocus_tar}"; then | ||
echo "Failed to download Fooocus" | ||
exit 1 | ||
fi | ||
|
||
. /app/venv/bin/activate | ||
pip install -r /app/fooocus/requirements_versions.txt | ||
if ! virtualenv /app/venv; then | ||
echo "Failed to create venv" | ||
exit 1 | ||
fi | ||
|
||
cd /app/Fooocus | ||
tar -xvf "${fooocus_tar}" --strip-components=1 | ||
rm -f "${fooocus_tar}" | ||
|
||
cd /app/fooocus | ||
# Execute the script with the provided arguments | ||
source /app/venv/bin/activate | ||
pip install -r /app/Fooocus/requirements_versions.txt | ||
python launch.py "$@" |