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

{Packaging} Optimize Linux package and docker image by trimming SDK #26172

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

bebound
Copy link
Contributor

@bebound bebound commented Apr 18, 2023

Description

We have used trim_sdk.py and only keep pyc file on Windows. Apply them on Linux and docker to reduce package size.

This is the first part, use trim_sdk on Linux.
Using pyc is #25801

Result:
Ubuntu 22.04 installed size: 965MB -> 576 MB, become 60% of original size.
RHEL 9 installed size 771MB -> 403 MB, become 52% of original size.
Docker 1328MB -> 952MB, become 72% of original size.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Apr 18, 2023

️✔️acr
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
🔄acs
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
🔄latest
🔄3.10
🔄3.9
🔄advisor
🔄latest
🔄3.10
️✔️3.9
🔄ams
🔄latest
🔄3.10
️✔️3.9
️✔️apim
️✔️latest
️✔️3.10
️✔️3.9
🔄appconfig
🔄latest
🔄3.10
️✔️3.9
🔄appservice
🔄latest
🔄3.10
🔄3.9
🔄aro
🔄latest
🔄3.10
️✔️3.9
🔄backup
🔄latest
🔄3.10
️✔️3.9
🔄batch
🔄latest
🔄3.10
🔄3.9
️✔️batchai
️✔️latest
️✔️3.10
️✔️3.9
️✔️billing
️✔️latest
️✔️3.10
️✔️3.9
🔄botservice
🔄latest
🔄3.10
🔄3.9
🔄cdn
🔄latest
🔄3.10
️✔️3.9
🔄cloud
🔄latest
🔄3.10
🔄3.9
🔄cognitiveservices
🔄latest
🔄3.10
️✔️3.9
🔄config
🔄latest
🔄3.10
️✔️3.9
🔄configure
🔄latest
🔄3.10
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.10
️✔️3.9
️✔️container
️✔️latest
️✔️3.10
️✔️3.9
🔄core
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
🔄latest
🔄3.10
️✔️3.9
🔄cosmosdb
🔄latest
🔄3.10
🔄3.9
🔄databoxedge
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
🔄latest
🔄3.10
🔄3.9
🔄dla
🔄latest
🔄3.10
️✔️3.9
🔄dls
🔄latest
🔄3.10
🔄3.9
️✔️dms
️✔️latest
️✔️3.10
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.10
️✔️3.9
🔄eventhubs
🔄latest
🔄3.10
️✔️3.9
🔄feedback
🔄latest
🔄3.10
🔄3.9
🔄find
🔄latest
🔄3.10
🔄3.9
🔄hdinsight
🔄latest
🔄3.10
🔄3.9
️✔️identity
️✔️latest
️✔️3.10
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
🔄keyvault
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
🔄latest
🔄3.10
🔄3.9
️✔️kusto
️✔️latest
️✔️3.10
️✔️3.9
️✔️lab
️✔️latest
️✔️3.10
️✔️3.9
🔄managedservices
🔄latest
🔄3.10
️✔️3.9
🔄maps
🔄latest
🔄3.10
🔄3.9
️✔️marketplaceordering
️✔️latest
️✔️3.10
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.10
️✔️3.9
🔄netappfiles
🔄latest
🔄3.10
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
🔄policyinsights
🔄latest
🔄3.10
🔄3.9
️✔️privatedns
️✔️latest
️✔️3.10
️✔️3.9
🔄profile
🔄latest
🔄3.10
️✔️3.9
🔄rdbms
🔄latest
🔄3.10
️✔️3.9
🔄redis
🔄latest
🔄3.10
🔄3.9
🔄relay
🔄latest
🔄3.10
🔄3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️role
️✔️latest
️✔️3.10
️✔️3.9
️✔️search
️✔️latest
️✔️3.10
️✔️3.9
🔄security
🔄latest
🔄3.10
️✔️3.9
🔄servicebus
🔄latest
🔄3.10
🔄3.9
🔄serviceconnector
🔄latest
🔄3.10
️✔️3.9
🔄servicefabric
🔄latest
🔄3.10
🔄3.9
🔄signalr
🔄latest
🔄3.10
🔄3.9
️✔️sql
️✔️latest
️✔️3.10
️✔️3.9
🔄sqlvm
🔄latest
🔄3.10
️✔️3.9
🔄storage
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
🔄latest
🔄3.10
🔄3.9
️✔️synapse
️✔️latest
️✔️3.10
️✔️3.9
🔄telemetry
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
🔄latest
🔄3.10
🔄3.9
🔄util
🔄latest
🔄3.10
🔄3.9
🔄vm
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
🔄latest
🔄3.10
🔄3.9

@azure-client-tools-bot-prd
Copy link

Hi @bebound,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 18, 2023

Packaging

@bebound bebound changed the title {Packaging} Trim Linux package and docker image by trimming SDK {Packaging} Optimize Linux package and docker image by trimming SDK Apr 18, 2023
@bebound bebound marked this pull request as ready for review April 18, 2023 05:08
Comment on lines 55 to 56
# Remove unused SDK version
%{python_cmd} %{repo_path}/scripts/trim_sdk.py
Copy link
Member

Choose a reason for hiding this comment

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

How about we move this line after L50 to align with Dockerfile?

@bebound bebound merged commit 5f52c83 into Azure:dev Apr 19, 2023
@bebound bebound deleted the linux-remove-sdk branch April 19, 2023 09:57
@jiasli
Copy link
Member

jiasli commented Apr 21, 2023

Nice work! This certainly improves #7387 a lot!

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 21, 2023

This is a great achievement.

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.

3 participants