Skip to content

Clean up cache files to reduce Docker image size #823

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

Merged

Conversation

PeterDaveHello
Copy link
Contributor

Remove unnecessary cache files and temporary data:

  • Remove apt lists after package installation
  • Use pip --no-cache-dir flag

Image size comparison:

REPOSITORY         TAG      IMAGE ID       CREATED          SIZE
scrapegraph-ai     after    609a2ecf4678   20 minutes ago   3.1GB
scrapegraph-ai     before   e3093b782ab0   24 minutes ago   3.39GB

This reduced about 0.29GB image size by preventing cache files from being included in the final image layers.

Remove unnecessary cache files and temporary data:
- Remove apt lists after package installation
- Use pip --no-cache-dir flag

Image size comparison:

```
REPOSITORY         TAG      IMAGE ID       CREATED          SIZE
scrapegraph-ai     after    609a2ecf4678   20 minutes ago   3.1GB
scrapegraph-ai     before   e3093b782ab0   24 minutes ago   3.39GB
```

This reduced about 0.29GB image size by preventing cache files from
being included in the final image layers.
@VinciGit00 VinciGit00 merged commit 7ed16db into ScrapeGraphAI:main Nov 24, 2024
3 checks passed
Copy link

🎉 This PR is included in version 1.32.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Dec 2, 2024

🎉 This PR is included in version 1.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants