Skip to content
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

chore: reduce docker image size #1523

Merged
merged 8 commits into from Feb 3, 2023
Merged

Conversation

zackpollard
Copy link
Contributor

@zackpollard zackpollard commented Feb 2, 2023

Reduces machine-learning docker image size from 2.4GB to ~850MB
Reduces server docker image size from 505MB to ~350MB
Reduces web docker image size from 350MB to ~ 150MB

@vercel
Copy link

vercel bot commented Feb 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
immich-code-coverage ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 2, 2023 at 10:00PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
immich ⬜️ Ignored (Inspect) Feb 2, 2023 at 10:00PM (UTC)

@vercel vercel bot temporarily deployed to Preview – immich-code-coverage February 2, 2023 16:01 Inactive
Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@vercel vercel bot temporarily deployed to Preview – immich-code-coverage February 2, 2023 18:17 Inactive
@vercel vercel bot temporarily deployed to Preview – immich-code-coverage February 2, 2023 19:12 Inactive
@vercel
Copy link

vercel bot commented Feb 2, 2023

Deployment failed with the following error:

Resource is limited - try again in 57 minutes (more than 100, code: "api-deployments-free-per-day").

@zackpollard zackpollard marked this pull request as ready for review February 2, 2023 19:39
Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🎉

@vercel
Copy link

vercel bot commented Feb 2, 2023

Deployment failed with the following error:

Resource is limited - try again in 22 minutes (more than 100, code: "api-deployments-free-per-day").

@vercel vercel bot temporarily deployed to Preview – immich-code-coverage February 2, 2023 22:00 Inactive
@alextran1502 alextran1502 merged commit 43da8c2 into main Feb 3, 2023
@alextran1502 alextran1502 deleted the chore/reduce-docker-image-size branch February 3, 2023 03:28
@@ -58,6 +58,7 @@
"cookie-parser": "^1.4.6",
"diskusage": "^1.1.3",
"exiftool-vendored": "^19.0.0",
"exiftool-vendored.pl": "^12.54.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope you are aware that this is not meant to be used directly as a dep?

"You shouldn't include either the exiftool-vendored.exe or exiftool-vendored.pl as direct dependencies to your project." - https://www.npmjs.com/package/exiftool-vendored install section

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we looked at this. That works fine, but we are specifically running npm ci --omit=optional to decrease the number of unused packages that are installed on the docker image. Unfortunately this is marked as an optional and there really isn't a way around getting it installed without listing it as a dependency or installing all our optional deps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants