Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
0d2cf9ac
Commit
0d2cf9ac
authored
Mar 29, 2023
by
yedpodtrzitko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: use existing virtualenv if already active
parent
22bcc7be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
webui.sh
webui.sh
+21
-14
No files found.
webui.sh
View file @
0d2cf9ac
...
...
@@ -152,24 +152,31 @@ else
cd
"
${
clone_dir
}
"
/
||
{
printf
"
\e
[1m
\e
[31mERROR: Can't cd to %s/%s/, aborting...
\e
[0m"
"
${
install_dir
}
"
"
${
clone_dir
}
"
;
exit
1
;
}
fi
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"Create and activate python venv"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
cd
"
${
install_dir
}
"
/
"
${
clone_dir
}
"
/
||
{
printf
"
\e
[1m
\e
[31mERROR: Can't cd to %s/%s/, aborting...
\e
[0m"
"
${
install_dir
}
"
"
${
clone_dir
}
"
;
exit
1
;
}
if
[[
!
-d
"
${
venv_dir
}
"
]]
then
"
${
python_cmd
}
"
-m
venv
"
${
venv_dir
}
"
first_launch
=
1
fi
# shellcheck source=/dev/null
if
[[
-f
"
${
venv_dir
}
"
/bin/activate
]]
if
[[
-z
"
${
VIRTUAL_ENV
}
"
]]
;
then
source
"
${
venv_dir
}
"
/bin/activate
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"Create and activate python venv"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
cd
"
${
install_dir
}
"
/
"
${
clone_dir
}
"
/
||
{
printf
"
\e
[1m
\e
[31mERROR: Can't cd to %s/%s/, aborting...
\e
[0m"
"
${
install_dir
}
"
"
${
clone_dir
}
"
;
exit
1
;
}
if
[[
!
-d
"
${
venv_dir
}
"
]]
then
"
${
python_cmd
}
"
-m
venv
"
${
venv_dir
}
"
first_launch
=
1
fi
# shellcheck source=/dev/null
if
[[
-f
"
${
venv_dir
}
"
/bin/activate
]]
then
source
"
${
venv_dir
}
"
/bin/activate
else
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\e
[1m
\e
[31mERROR: Cannot activate python venv, aborting...
\e
[0m"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
exit
1
fi
else
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\e
[1m
\e
[31mERROR: Cannot activate python venv, aborting...
\e
[0m
"
printf
"
python venv already activate:
${
VIRTUAL_ENV
}
"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
exit
1
fi
if
[[
!
-z
"
${
ACCELERATE
}
"
]]
&&
[
${
ACCELERATE
}
=
"True"
]
&&
[
-x
"
$(
command
-v
accelerate
)
"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment