-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Users/daviwu/ai studio curated env (#3224)
* AI Studio curated env * Update name from ai-studio-development to ai-studio-dev * Rename folder from ai-studio-development to ai-studio-dev * Resolve dependency conflicts * Update category to AI Studio
- Loading branch information
Showing
5 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: ai-studio-dev | ||
version: auto | ||
type: environment | ||
spec: spec.yaml | ||
extra_config: environment.yaml | ||
categories: ["AI Studio"] |
41 changes: 41 additions & 0 deletions
41
assets/aistudio/environments/ai_studio_dev/context/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM mcr.microsoft.com/devcontainers/python:3.10 | ||
|
||
WORKDIR / | ||
|
||
# needed for build_mlindex | ||
RUN apt update && apt upgrade -y && apt install -y fuse | ||
|
||
# Install dependencies | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# inference server dependencies, it has to be installed after the requirements.txt | ||
RUN pip install azureml-inference-server-http | ||
# Temporary fix version for security patch | ||
RUN pip install -U setuptools>=70.0.0 | ||
|
||
# Adding this install under root's path for the custom AI Studio container solution | ||
ENV PATH="/home/vscode/.dotnet/tools:${PATH}" | ||
|
||
# The instructions run after this for AI CLI are required to be run by the vscode user | ||
WORKDIR /home/vscode | ||
USER vscode | ||
|
||
# Install Azure CLI | ||
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | ||
|
||
# Install Azure Developer CLI (AZD) | ||
RUN curl -fsSL https://aka.ms/install-azd.sh | bash | ||
|
||
# The VS Code dev container base image contains both Python 3.10 and 3.11, with 3.11 taking priority. | ||
# The following is a workaround to set the default Python interpreter to 3.10. This is currently a requirement for the AI CLI, SDK and Prompt flow packages. | ||
RUN mkdir -p /home/vscode/.vscode-server/data/Machine | ||
RUN mkdir -p /home/vscode/.vscode-server-insiders/data/Machine | ||
RUN echo '{ "python.defaultInterpreterPath": "/usr/local/bin/python", "workbench.editorAssociations": { "**/afh/**/README.md": "vscode.markdown.preview.editor" } }' > /home/vscode/.vscode-server/data/Machine/settings.json | ||
RUN echo '{ "python.defaultInterpreterPath": "/usr/local/bin/python", "workbench.editorAssociations": { "**/afh/**/README.md": "vscode.markdown.preview.editor" } }' > /home/vscode/.vscode-server-insiders/data/Machine/settings.json | ||
|
||
# Temporary fix for the security issue: remove the old version of package setuptools from the Python container | ||
RUN FILE="/usr/local/lib/python3.10/ensurepip/_bundled/setuptools-65.5.0-py3-none-any.whl"; if [ -f "$FILE" ]; then sudo rm -f "$FILE"; fi | ||
RUN FILE="/opt/az/lib/python3.11/ensurepip/_bundled/setuptools-65.5.0-py3-none-any.whl"; if [ -f "$FILE" ]; then sudo rm -f "$FILE"; fi | ||
RUN DIR="/usr/local/py-utils/shared/lib/python3.10/site-packages/setuptools-65.5.0.dist-info"; if [ -d "$DIR" ]; then sudo rm -rf "$DIR"; fi | ||
RUN DIR="/usr/local/py-utils/venvs/black"; if [ -d "$DIR" ]; then sudo rm -rf "$DIR"; fi |
18 changes: 18 additions & 0 deletions
18
assets/aistudio/environments/ai_studio_dev/context/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Install Python SDK | ||
ipykernel | ||
openai>1.0 | ||
# Promptflow | ||
promptflow[azure]>=1.11.0 | ||
promptflow-evals | ||
promptflow-rag | ||
keyrings.alt | ||
# hardcoded the version of azureml-mlflow here for faster Docker image building speed | ||
azureml-mlflow==1.57.0 | ||
# copilot dependencies | ||
langchain==0.1.17 | ||
langchain-openai==0.1.6 | ||
semantic-kernel | ||
pytest | ||
keyring | ||
# # inference server dependencies (moved to Docker file) | ||
# azureml-inference-server-http |
12 changes: 12 additions & 0 deletions
12
assets/aistudio/environments/ai_studio_dev/environment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
image: | ||
name: azureml/curated/ai-studio-dev | ||
os: linux | ||
context: | ||
dir: context | ||
dockerfile: Dockerfile | ||
template_files: | ||
- Dockerfile | ||
- requirements.txt | ||
publish: | ||
location: mcr | ||
visibility: public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json | ||
|
||
description: (Public Preview) Environment for Generative AI on Azure containing the Prompt flow SDK with the latest compatible versions of Debian Linux and Python. This environment is part of a preview feature, and subject to the supplemental terms of use for [Microsoft Azure Previews](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/). | ||
|
||
name: "{{asset.name}}" | ||
version: "{{asset.version}}" | ||
|
||
build: | ||
path: "{{image.context.path}}" | ||
dockerfile_path: "{{image.dockerfile.path}}" | ||
|
||
os_type: linux | ||
|
||
tags: | ||
Preview: "" |