Skip to content

Commit

Permalink
migrating component environment (#3505)
Browse files Browse the repository at this point in the history
* migrating component env to assets

* adding category

* changing category

* resolving pr comments

* making comp images public

* upgrading to ubuntu22 for component version
  • Loading branch information
jayesh-tanna authored Nov 6, 2024
1 parent c7e3e68 commit 3ae6492
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 2 deletions.
6 changes: 6 additions & 0 deletions assets/designer/environments/component/asset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: component
version: auto
type: environment
spec: spec.yaml
extra_config: environment.yaml
categories: ["Designer", "Python"]
16 changes: 16 additions & 0 deletions assets/designer/environments/component/context/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04:{{latest-image-tag}}

WORKDIR /

ENV CONDA_PREFIX=/azureml-envs/component-sdk
ENV CONDA_DEFAULT_ENV=$CONDA_PREFIX
ENV PATH=$CONDA_PREFIX/bin:$PATH
# This is needed for mpi to locate libpython
ENV LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH

# Create conda environment
COPY conda_dependencies.yaml .
RUN conda env create -p $CONDA_PREFIX -f conda_dependencies.yaml -q && \
rm conda_dependencies.yaml && \
conda run -p $CONDA_PREFIX pip cache purge && \
conda clean -a -y
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: component
channels:
- conda-forge
dependencies:
- python=3.9
- pip=24.0
- pip:
- azure-ml-component=={{latest-pypi-version}}
- azureml-defaults=={{latest-pypi-version}}
- pyarrow>=14.0.1
12 changes: 12 additions & 0 deletions assets/designer/environments/component/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
image:
name: azureml/curated/component
os: linux
context:
dir: context
dockerfile: Dockerfile
template_files:
- Dockerfile
- conda_dependencies.yaml
publish:
location: mcr
visibility: public
17 changes: 17 additions & 0 deletions assets/designer/environments/component/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json

description: >-
An environment for built-in component that can dynamically evaluate python expression for 1P request feature.
name: "{{asset.name}}"
version: "{{asset.version}}"

build:
path: "{{image.context.path}}"
dockerfile_path: "{{image.dockerfile.path}}"

os_type: linux

tags:
OS: Ubuntu22.04
Python: 3.9
2 changes: 1 addition & 1 deletion assets/pipelines/environments/mldesigner-minimal/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ os_type: linux

tags:
OS: Ubuntu20.04
Python: 3.8
Python: 3.9
2 changes: 1 addition & 1 deletion assets/pipelines/environments/mldesigner/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ os_type: linux

tags:
OS: Ubuntu20.04
Python: 3.8
Python: 3.9

0 comments on commit 3ae6492

Please sign in to comment.