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
bf08a5b7
Commit
bf08a5b7
authored
Feb 17, 2024
by
AUTOMATIC1111
Committed by
GitHub
Feb 17, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14910 from analysisjp/wsl2_flx
fixed webui.sh issue that occurred in WSL environment (fix: #14883)
parents
48ce0379
69f9564a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
webui.sh
webui.sh
+5
-7
No files found.
webui.sh
View file @
bf08a5b7
...
@@ -227,9 +227,7 @@ fi
...
@@ -227,9 +227,7 @@ fi
prepare_tcmalloc
()
{
prepare_tcmalloc
()
{
if
[[
"
${
OSTYPE
}
"
==
"linux"
*
]]
&&
[[
-z
"
${
NO_TCMALLOC
}
"
]]
&&
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
if
[[
"
${
OSTYPE
}
"
==
"linux"
*
]]
&&
[[
-z
"
${
NO_TCMALLOC
}
"
]]
&&
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
# check glibc version
# check glibc version
LIBC_LIB
=
"
$(
PATH
=
/usr/sbin:
$PATH
ldconfig
-p
|
grep
-P
"libc.so.6"
|
head
-n
1
)
"
LIBC_VER
=
$(
echo
$(
ldd
--version
|
awk
'NR==1 {print $NF}'
)
|
grep
-oP
'\d+\.\d+'
)
LIBC_INFO
=
$(
echo
${
LIBC_LIB
}
|
awk
'{print $NF}'
)
LIBC_VER
=
$(
echo
$(
${
LIBC_INFO
}
|
awk
'NR==1 {print $NF}'
)
|
grep
-oP
'\d+\.\d+'
)
echo
"glibc version is
$LIBC_VER
"
echo
"glibc version is
$LIBC_VER
"
libc_vernum
=
$(
expr
$LIBC_VER
)
libc_vernum
=
$(
expr
$LIBC_VER
)
# Since 2.34 libpthread is integrated into libc.so
# Since 2.34 libpthread is integrated into libc.so
...
@@ -244,9 +242,9 @@ prepare_tcmalloc() {
...
@@ -244,9 +242,9 @@ prepare_tcmalloc() {
TC_INFO
=(
${
TCMALLOC
//=>/
}
)
TC_INFO
=(
${
TCMALLOC
//=>/
}
)
if
[[
!
-z
"
${
TC_INFO
}
"
]]
;
then
if
[[
!
-z
"
${
TC_INFO
}
"
]]
;
then
echo
"Check TCMalloc:
${
TC_INFO
}
"
echo
"Check TCMalloc:
${
TC_INFO
}
"
# Determine if the library is linked to libpt
thread and resolve undefined symbol: pt
thread_key_create
# Determine if the library is linked to libpt
hread and resolve undefined symbol: p
thread_key_create
if
[
$(
echo
"
$libc_vernum
<
$libc_v234
"
| bc
)
-eq
1
]
;
then
if
[
$(
echo
"
$libc_vernum
<
$libc_v234
"
| bc
)
-eq
1
]
;
then
# glibc < 2.3
3 pthread_key_create into libpth
ead.so. check linking libpthread.so...
# glibc < 2.3
4 pthread_key_create into libpthr
ead.so. check linking libpthread.so...
if
ldd
${
TC_INFO
[2]
}
|
grep
-q
'libpthread'
;
then
if
ldd
${
TC_INFO
[2]
}
|
grep
-q
'libpthread'
;
then
echo
"
$TC_INFO
is linked with libpthread,execute LD_PRELOAD=
${
TC_INFO
[2]
}
"
echo
"
$TC_INFO
is linked with libpthread,execute LD_PRELOAD=
${
TC_INFO
[2]
}
"
# set fullpath LD_PRELOAD (To be on the safe side)
# set fullpath LD_PRELOAD (To be on the safe side)
...
@@ -256,7 +254,7 @@ prepare_tcmalloc() {
...
@@ -256,7 +254,7 @@ prepare_tcmalloc() {
echo
"
$TC_INFO
is not linked with libpthread will trigger undefined symbol: pthread_Key_create error"
echo
"
$TC_INFO
is not linked with libpthread will trigger undefined symbol: pthread_Key_create error"
fi
fi
else
else
# Version 2.34 of libc.so (glibc) includes the pthead library IN GLIBC. (USE ubuntu 22.04 and modern linux system and WSL)
# Version 2.34 of libc.so (glibc) includes the pth
r
ead library IN GLIBC. (USE ubuntu 22.04 and modern linux system and WSL)
# libc.so(glibc) is linked with a library that works in ALMOST ALL Linux userlands. SO NO CHECK!
# libc.so(glibc) is linked with a library that works in ALMOST ALL Linux userlands. SO NO CHECK!
echo
"
$TC_INFO
is linked with libc.so,execute LD_PRELOAD=
${
TC_INFO
[2]
}
"
echo
"
$TC_INFO
is linked with libc.so,execute LD_PRELOAD=
${
TC_INFO
[2]
}
"
# set fullpath LD_PRELOAD (To be on the safe side)
# set fullpath LD_PRELOAD (To be on the safe side)
...
@@ -266,7 +264,7 @@ prepare_tcmalloc() {
...
@@ -266,7 +264,7 @@ prepare_tcmalloc() {
fi
fi
done
done
if
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
if
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
printf
"
\e
[1m
\e
[31mCannot locate TCMalloc. Do you have tcmalloc or g
perftools
installed on your system? (improves CPU memory usage)
\e
[0m
\n
"
printf
"
\e
[1m
\e
[31mCannot locate TCMalloc. Do you have tcmalloc or g
oogle-perftool
installed on your system? (improves CPU memory usage)
\e
[0m
\n
"
fi
fi
fi
fi
}
}
...
...
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