Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
384 stars 1.25k forks source link

What will be the cli equivalent of creating an environment using private pip wheel #5111

Open Aditya369nair opened 2 years ago

Aditya369nair commented 2 years ago

Related command

Extension name (the extension in question)

azure ml extension

Description of issue (in as much detail as possible)

How can I achieve the equivalent of the following python code using the environment yaml ?

Environment.add_private_pip_wheel(ws, "./my-custom-module.whl", exist_ok=True)

I create az ml env using a yaml file like with this

$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json
name: rnair-tips-env-2
image: mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04:20220504.v1
conda_file: conda-yamls/tips.yaml
description: Environment containing TIPS

and tips.yaml looks like this

name: tips-conda
channels:
  - conda-forge
dependencies:
  - python=3.7
  - pip:
    - azureml-defaults
    - https://testml1769050118.blob.core.windows.net/azureml/Environment/azureml-private-packages/tips-1.0.12-py3-none-any.whl

where the whl file is uploaded manually and I would want to automate that process


yonzhan commented 2 years ago

route to CXP team

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.

Issue Details
- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.com/Azure/azure-cli/issues) ### Related command ### Extension name (the extension in question) azure ml extension ### Description of issue (in as much detail as possible) How can I achieve the equivalent of the following python code using the environment yaml ? ``` Environment.add_private_pip_wheel(ws, "./my-custom-module.whl", exist_ok=True) ``` I create az ml env using a yaml file like with this ``` $schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json name: rnair-tips-env-2 image: mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04:20220504.v1 conda_file: conda-yamls/tips.yaml description: Environment containing TIPS ``` and `tips.yaml` looks like this ``` name: tips-conda channels: - conda-forge dependencies: - python=3.7 - pip: - azureml-defaults - https://testml1769050118.blob.core.windows.net/azureml/Environment/azureml-private-packages/tips-1.0.12-py3-none-any.whl ``` where the whl file is uploaded manually and I would want to automate that process -----
Author: Aditya369nair
Assignees: -
Labels: `question`, `extension/ml`, `customer-reported`, `Machine Learning`, `Service Attention`, `Auto-Assign`
Milestone: -
diondrapeck commented 2 years ago

Tagging @hugoaponte for environments insight

SouravMalliK commented 1 year ago

I too have the same question. Is there any way we could use the equivalent command using components using yaml then use these components to build pipeline.

whl_url = Environment.add_private_pip_wheel(workspace=ws,file_path = wheel_path1, exist_ok=True)