We have a number of "in_container" scripts written in Bash, They are doing a number of houseekeeping stuff but since we already have Python 3.7+ inside the CI image, we could modularise them more and make them run from external and simplify entrypoint_ci (for example separate script for tests).
"install",
            "--root-user-action",
            "ignore",
            installation_spec.airflow_package,
        ]
        console.print(f"\n[bright_blue]Installing airflow package: {installation_spec.airflow_package}")
        if installation_spec.airflow_constraints_location:
            console.print(f"[bright_blue]Use constraints: {installation_spec.airflow_constraints_location}")
            install_airflow_cmd.extend(["--constraint", installation_spec.airflow_constraints_location])
        console.print()
        run_command(install_airflow_cmd, github_actions=github_actions, check=True)
    if installation_spec.provider_packages:
        install_providers_cmd = ["pip", "install", "--root-user-action", "ignore"]
        console.print("\n[bright_blue]Installing provider packages:")
        for provider_package in sorted(installation_spec.provider_packages):
            console.print(f"  {provider_package}")
        console.print()
        for provider_package in installation_spec.provider_packages:
            install_providers_cmd.append(provider_package)
        if installation_spec.provider_constraints_location:
            console.print(
                f"[bright_blue]with constraints: {installation_spec.provider_constraints_location}\n"
            )
            install_providers_cmd.extend(["--constraint", installation_spec.provider_constraints_location])
        console.print()
        run_command(install_providers_cmd, github_actions=github_actions, check=True)
    console.print("[green]Done!")
if __name__ == "__main__":
    install_airflow_and_providers()