Hi Derick John
We can extract the dependencies from pyproject.toml and put it in a requirements.txt and create a custom docker image based out of Azure default images to install the requirement.txt
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04
# Set working directory
WORKDIR /app
# Copy requirements
COPY requirements.txt .
# Install dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
You can also do the same probably with pyprojec.toml file
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04
# Set up conda environment
COPY conda.yaml .
RUN conda env create -f conda.yaml
# Activate environment and install your package
COPY . /workspace
WORKDIR /workspace
RUN /bin/bash -c "source activate && pip install -e ."
You have to provide .yaml file, pyprojec.toml/requirement.txt along the custom docker image location while creating your custom environment.
You can follow this guide to build a custom docker image and push it to container registry.
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-quickstart-task-cli
But please make sure to provide admin access and Azure AML workspace as contributor to your container registry
If it helps, please let me know.
Thank you.