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).
airflow_constraints_reference=airflow_constraints_reference,
            airflow_package_version=use_airflow_version,
            default_constraints_branch=default_constraints_branch,
            github_repository=github_repository,
            python_version=python_version,
        )
    else:
        console.print(f"\nInstalling airflow via apache-airflow=={use_airflow_version}")
        airflow_package_spec = f"apache-airflow=={use_airflow_version}{airflow_extras}"
        airflow_constraints_location = get_airflow_constraints_location(
            airflow_skip_constraints=airflow_skip_constraints,
            airflow_constraints_mode=airflow_constraints_mode,
            airflow_constraints_location=airflow_constraints_location,
            airflow_constraints_reference=airflow_constraints_reference,
            airflow_package_version=use_airflow_version,
            default_constraints_branch=default_constraints_branch,
            github_repository=github_repository,
            python_version=python_version,
        )
    provider_package_list = []
    if use_packages_from_dist:
        selected_providers_list = install_selected_providers.split(",") if install_selected_providers else []
        if selected_providers_list:
            console.print(f"\n[bright_blue]Selected providers: {selected_providers_list}\n")
        else:
            console.print("\n[bright_blue]No preselected providers\n")
        provider_package_list = find_provider_packages(extension, selected_providers_list)
    return InstallationSpec(
        airflow_package=airflow_package_spec,
        airflow_constraints_location=airflow_constraints_location,