-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
๐ท build: change base image from musl
to glibc
#3926
Conversation
@hezhijie0327 is attempting to deploy a commit to the LobeHub Pro Team on Vercel. A member of the Team first needs to authorize it. |
๐ @hezhijie0327 Thank you for raising your pull request and contributing to our Community |
Codecov ReportAll modified and coverable lines are covered by tests โ
Additional details and impacted files@@ Coverage Diff @@
## main #3926 +/- ##
=========================================
Coverage 92.23% 92.23%
=========================================
Files 472 472
Lines 32741 32741
Branches 3192 2031 -1161
=========================================
Hits 30198 30198
Misses 2543 2543
Flags with carried forward coverage won't be shown. Click here to find out more. โ View full report in Codecov by Sentry. |
ๆฒกๅคช็ๆๆๅไธๅฅ่ฏใๅฆๆๆขๆ slim ๏ผๆๅ ไฝ็งฏไผๅคงๅคๅฐ๏ผ่ชๅทฑๅbase้ๅ็ๆๅฅ้ขๅค็ๆถ็ไธ๏ผ |
I didn't quite understand the last sentence. If you change it to slim, how much larger will the packaging volume be? Are there any additional benefits if you make your own base image? |
ๆๆฌๅฐๆๅไธ็ถๅไธไผ HUB ๅฎ้ ่ฎก็ฎไธ |
I split it locally and uploaded it to HUB for actual calculation. |
@arvinxx Base ้ๅ็ผฉๅ 16.57%๏ผ7.73MB๏ผ๏ผApp ้ๅ็ผฉๅ 18.71%๏ผ18.42MB๏ผ |
@arvinxx Base image reduced by 16.57% (7.73MB), App image reduced by 18.71% (18.42MB) |
@arvinxx ๅฎๆด็ๆๅปบๆต่ตฐไบไธๅ๏ผ่ฟๆฏๅพๆๆพ็ ้ๅๆๆๅฑๆฐๅฏนๆฏ๏ผ็บขๆกไธบๆๆๅฑๆฐๅคงๅฐ๏ผ้ปๆกไธบ Base ้ๅ๏ผ |
@arvinxx The complete build flow went around and it was still obvious Comparison of the effective number of mirroring layers (the red box is the effective number of layers, the yellow box is the Base image) |
@arvinxx ๅ่ไบ K8S ็ ่ช็ญพ่ฟไธชๆฏๆ็๏ผไธคไธชๆนๆก
SLIM ็่ฟไผๅฟๆ Build ไธ |
@arvinxx referred to the Self-signing supports this, two options
I will build SLIM later |
ๅฏ๏ผไธป่ฆ็ไธไฝ็งฏ่จ่็้ฎ้ขใๅ ถๅฎๆ่งๅพไธไธช docker ไฝ็งฏๅจ 200M ๅบๆฌไธๅฐฑๆฏๅฏไปฅๆฅๅ็ใ่ฟๅคง๏ผๆฏๅฆ1G๏ผๅฐฑไผ็นๅซ่่ฟใๅจ้ๅฝ็ๅฐบๅฏธ่ๅดๅ ๅ ถๅฎๅฏ็ปดๆคๆง๏ผๅ ๆฌ่ฟญไปฃๅ็จๆท็ญ็๏ผไผๆด้่ฆไธไบใ |
Well, it mainly depends on the issue of volume expansion. In fact, I think a docker volume of 200M is basically acceptable. If it is too large (such as 1G), it will be particularly bloated. Maintainability (including iteration and user Q&A) is actually more important within the appropriate size range. |
@arvinxx ไฝฟ็จ |
@arvinxx After using |
่ฏท้ฎๆนๆกไธ
ๆฏๅจlobe็็ฏๅขๅ้้่ฎพ็ฝฎๅ๏ผ่ฝ่งฃๅณไปไน้ฎ้ข๏ผๅบ่ฏฅไธlogtoๆฅdns่งฃๆ้่ฏฏๆ ๅ ณๅง๏ผ |
Please tell me about option one
Is it set in the lobe environment variable? What problem can be solved? It should have nothing to do with the dns parsing error reported by logto, right? |
@hezhijie0327 ๆจ base ้ๅไผๅฏผ่ดๆๆ vercel ็็จๆท breaking ไธๆฌกๅๆญฅ๏ผๅฆๆๆ ๅฟ ่ฆๆๅปบ่ฎฎไธ่ฆๅจ CI ใไปไฝ็งฏๅๅๆฅ่ฏดๆ่ชๅทฑๆ่ง slim ๅฏไปฅๆฅๅใๅๆญฃๅชๆๅฐฑ็ฎๆฏ 150M ไนๆฏๅ็ฑปๅ็ OpenWebUI / LibreChat ไฝ็งฏ้ฝ่ฆๅฐ็ๅคๅพๅคใ ่ฆไธ่ฟๆฏๅๆขๅฐ slim ๏ผ็ถๅๅชไฟ็ proxyChain ็็ๆฌ๏ผๆ่ง่ฟๆ ทๆไปฌ้่ฆ้ขๅค็ปดๆค็ๆๆฌไผๅฐไธไบ |
@hezhijie0327 Pushing the base image will cause all vercel users to break the synchronization at one time. I recommend not touching CI if it is not necessary. In terms of volume change, I feel slim is acceptable. Anyway, even 150M is much smaller than the same type of OpenWebUI / LibreChat. Or switch to slim and only keep the proxyChain version? I feel like the extra maintenance costs we need will be smaller this way. |
@arvinxx ๆๅฎไบ |
@arvinxx Got it |
@arvinxx ๅฐ่ฏไบไธไธชๆฐๆนๆณ๏ผ่ฝ่พพๆๅไธ็ฎ็๏ผๆ glibc ็ๅบๅฑๆ ้็ฌ็ซ Base ้ๅ๏ผไฝๆฏๅฐบๅฏธไธๅฝๅ็ Alpine ๅนณ้ฝ็่ณๆดไผ๏ผ่ฟไผๅฟๆไธไธชๆฐ PR ็็๏ผ |
@arvinxx tried a new method, which can achieve the same purpose. It has the bottom layer of glibc, but the size is the same as or even better than the current Alpine. Will you open a new PR later and take a look? |
@hezhijie0327 ๅฏไปฅๅ๏ผ่ฟไธชๆขๆ slim ๆฒกๅฅ้ฎ้ข็่ฏๆๅ ๅไบ๏ผๆฐๆนๆณๅฆๅคๆไธไธช PR ๅไธ่ตท็็~ |
@hezhijie0327 Yes, if there is no problem with changing this to slim, I will combine it first. I will submit a PR for the new method and then we will take a look~ |
ๆฒกๅฅ้ฎ้ขไบ๏ผๆฌๅฐ Build ้ฝ่ฟไบ |
There is no problem anymore, the local build has passed. |
โค๏ธ Great PR @hezhijie0327 โค๏ธ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
๐ This PR is included in version 1.19.3 ๐ The release is available on: Your semantic-release bot ๐ฆ๐ |
๐ป ๅๆด็ฑปๅ | Change Type
๐ ๅๆด่ฏดๆ | Description of Change
ๅบไบ
musl
็Alpine
้ๅๅญๅจไธๅธธ่งglibc
้ๅๅ่ฝ็ๅทฎๅผ๏ผๅฆไธๆฅๆๅค็DNS
้ฎ้ข๏ผ็ฐๅฐๆ็ป้ๅๅๆขไธบๆดๅ ้็จ็glibc
็ฏๅขmusl
็node:20-alpine
ๅบ็ก้ๅๅๆขๅๅบไบglibc
็node:20-slim
a.
node:20-slim
ๅบ็ก้ๅb. ๆทปๅ
busybox
&proxychains-ng
่ฝฏไปถๅ ๏ผ็จๆทๅๅปบๅ/etc/proxychains4.conf
้ ็ฝฎๆไปถๆ้่ฎพ็ฝฎc.
LobeChat
ๅบ็จ๐ ่กฅๅ ไฟกๆฏ | Additional Information