From 3eaf200befcc35a67954d38503ff1923254bfdf0 Mon Sep 17 00:00:00 2001 From: levy <897895407@qq.com> Date: Mon, 29 Apr 2024 19:34:38 +0800 Subject: [PATCH] feat: image link --- src/devops/reduce-python-image-size.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/devops/reduce-python-image-size.md b/src/devops/reduce-python-image-size.md index 1a573db4..7f554bc0 100644 --- a/src/devops/reduce-python-image-size.md +++ b/src/devops/reduce-python-image-size.md @@ -9,7 +9,7 @@ tag: ## 背景 当你为 LLM 应用构建镜像时,发现整个过程很慢,一看镜像体积:好家伙,1.76 G! -![](https://cdn.nlark.com/yuque/0/2024/png/160590/1704179561250-cca8b370-edb0-4d90-a0d1-4e4db5e25a71.png) +![](https://raw.githubusercontent.com/levy9527/image-holder/main/md-image-kit/1704179561250-cca8b370-edb0-4d90-a0d1-4e4db5e25a71.png) 能不能减少镜像体积,缩短打包时间啊?本文将分享两招实用的技巧,让 Python 应用的镜像体积减少 50%。 @@ -67,10 +67,10 @@ run pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip && \ ``` ## 优化效果 第一次优化,使用 slim 镜像: -![](https://cdn.nlark.com/yuque/0/2024/png/160590/1704179592750-ab34f91e-7ab7-45e4-856a-314341602a74.png) +![](https://raw.githubusercontent.com/levy9527/image-holder/main/md-image-kit/1704179592750-ab34f91e-7ab7-45e4-856a-314341602a74.png) 第二次优化,减少层数、取消本地缓存: -![](https://cdn.nlark.com/yuque/0/2024/png/160590/1704179609044-68068d48-0b3b-4f5f-be9a-7745a9173f98.png) +![](https://raw.githubusercontent.com/levy9527/image-holder/main/md-image-kit/1704179609044-68068d48-0b3b-4f5f-be9a-7745a9173f98.png) 小小的改动,大大的变化! ## 参考 [https://icloudnative.io/posts/intro-guide-to-dockerfile-best-practices/](https://icloudnative.io/posts/intro-guide-to-dockerfile-best-practices/)