Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.96k forks source link

Ship azure-cli as binary instead as Python module #23397

Open mblaschke-daimlertruck opened 2 years ago

mblaschke-daimlertruck commented 2 years ago

Azure-cli is currently shipped as Python module which requires the installation of Python. On Linux (eg. Docker images) it installs ~1 GB of runtime and modules (related to https://github.com/Azure/azure-cli/issues/23366)

Shipping the azure-cli as standalone binary would improve the situation and would make azure-cli independent from the installed Python runtime.

Example: docker-compose 1.x was shipped as standalone binary with ~10 MiB.

yonzhan commented 2 years ago

@jiasli for awareness

jiasli commented 2 years ago

The latest Azure CLI composes of 66 command modules and 4785 commands. The versatility certainly justifies its size.

We are working right now on reducing Azure CLI package size. You may check more details in https://github.com/Azure/azure-cli/issues/7387.

Previously, we indeed tried to package Azure CLI as one executable utilizing PyInstaller (https://github.com/Azure/azure-cli/pull/16115), but we realized the executable would be hundreds of MBs, which is certainly not a good idea.

mblaschke-daimlertruck commented 3 weeks ago

any progress?

az cli is still bigger than my whole IDE, the container image still has ~600 MiB.