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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing pulumi-azure-native adds 1.05GB to docker image #2096

Closed
wallflower762 opened this issue Nov 24, 2022 · 1 comment
Closed

Installing pulumi-azure-native adds 1.05GB to docker image #2096

wallflower762 opened this issue Nov 24, 2022 · 1 comment
Labels
kind/enhancement Improvements or new features resolution/duplicate This issue is a duplicate of another issue

Comments

@wallflower762
Copy link

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

I deploy my infrastructure using Bitbucket pipelines. To do this, I build a base image to run the deployment from which includes Az CLI and pulumi-azure-native using the python pulumi image as a base.

The image size after installing these tools and packages is 2.8GB, which is huge. I managed to trim 550MB off the Az CLI install, but the pulumi-azure-native install using pip is add a full 1.05GB to the image.

Is there any way to reduce this size? It significantly affects the pipeline startup times.

Affected area/feature

Generally useful for people using automated pipelines.

@wallflower762 wallflower762 added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Nov 24, 2022
@danielrbradley danielrbradley added resolution/duplicate This issue is a duplicate of another issue and removed needs-triage Needs attention from the triage team labels Nov 28, 2022
@danielrbradley
Copy link
Member

Hi @wallflower762, there's not currently a way of reducing the size of the SDK as it stands.

I'll close this as a duplicate of #913

You could try experimenting with deleting the python modules you're not using within the pulumi-azure-native package. This won't work for type-checking, but should be fine for just running the Python code as modules are lazily loaded at runtime, so this likely won't cause an issue if files are missing that aren't referenced. This is certainly not a "supported" approach and may break in the future if the SDK shape changes but might give a temporary route forward as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants