Skip to content

Commit

Permalink
DBCopilot environment
Browse files Browse the repository at this point in the history
  • Loading branch information
akshata29 committed Sep 7, 2023
1 parent 17917cd commit 334b190
Show file tree
Hide file tree
Showing 20 changed files with 155 additions and 9 deletions.
6 changes: 3 additions & 3 deletions LLMOps.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ For this workshop following are some of the operations we will automate:
- [Python 3.9 or later](https://www.python.org/downloads/) installed on your local machine.
- [Install Prompt Flow Extension](https://marketplace.visualstudio.com/items?itemName=prompt-flow.prompt-flow)
- Custom Environment. Go to Azure ML Workspace -> Assets -> Environments -> Custom Environments -> Create. Select the following configuration
- Name - entaoaienv
- Name - entaoai
- Select environment source - Use existing docker image with optional conda file
- Container registry image path - docker pull akshata13/chatpdfenv:latest
- Container registry image path - docker pull akshata13/entaoai:latest
- Click Next, Next on Tags and Click Create on Review screen
- ![Custom Environment](./assets/custom-environment.png)
- Create new Compute Instance (Azure ML Workspace -> Manage -> Compute -> Compute Instance -> Create). Select the following configuration
Expand All @@ -46,7 +46,7 @@ For this workshop following are some of the operations we will automate:
- Runtime name - entaoai
- Select Azure ML compute instance -> entaoai
- Custom Application -> New
- Environment -> use customized environment -> entaoaienv:1
- Environment -> use customized environment -> entaoai:1
- Click Create
- ![Custom Runtime](./assets/custom-environment.png)

Expand Down
4 changes: 2 additions & 2 deletions Workshop/promptflow/deployment/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ type: managed
# You can also specify model files path inline
# path: examples/flows/chat/basic-chat
environment:
name: entaoaienv
image: akshata13/chatpdfenv:latest
#name: entaoaienv
image: akshata13/entaoai:latest
# inference config is used to build a serving container for online deployments
inference_config:
liveness_route:
Expand Down
4 changes: 2 additions & 2 deletions Workshop/promptflow/environment/Instruction
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ az ml environment create -f environment_build.yaml --subscription astalatiext -g
docker login dataaiamlwksstorcr.azurecr.io/azureml/azureml_8059bbe001359e5667651b2ac6ff004c (use login/password from Azure Portal -> Container Reg)
docker pull dataaiamlwksstorcr.azurecr.io/azureml/azureml_8059bbe001359e5667651b2ac6ff004c
docker login docker.io
docker tag dataaiamlwksstorcr.azurecr.io/azureml/azureml_8059bbe001359e5667651b2ac6ff004c akshata13/chatpdfenv
docker push akshata13/chatpdfenv:latest
docker tag dataaiamlwksstorcr.azurecr.io/azureml/azureml_8059bbe001359e5667651b2ac6ff004c akshata13/entaoai
docker push akshata13/entaoai:latest
az ml environment create -f environment.yaml --subscription astalatiext -g dataai -w dataaiamlwks
4 changes: 2 additions & 2 deletions Workshop/promptflow/environment/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json
name: entaoaienv
image: akshata13/chatpdfenv:latest
name: entaoai
image: akshata13/entaoai:latest
inference_config:
liveness_route:
port: 8080
Expand Down
5 changes: 5 additions & 0 deletions api/PromptFlow/Environment/entaoai/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/azureml/promptflow/promptflow-runtime:20230829.v3
COPY * ./
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install -r extra_requirements.txt
24 changes: 24 additions & 0 deletions api/PromptFlow/Environment/entaoai/Instruction
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
az login(optional)
az account set --subscription "astalatiext"
az configure --defaults workspace=dataaiamlwks group=dataai
az ml environment create -f environment_build.yaml --subscription astalatiext -g dataai -w dataaiamlwks
docker login dataaiamlwksstorcr.azurecr.io/azureml/azureml_19e313247fda6be77ea6441ff69b977e (use login/password from Azure Portal -> Container Reg)
docker pull dataaiamlwksstorcr.azurecr.io/azureml/azureml_19e313247fda6be77ea6441ff69b977e
docker login docker.io
docker tag dataaiamlwksstorcr.azurecr.io/azureml/azureml_19e313247fda6be77ea6441ff69b977e akshata13/entaoai
docker push akshata13/entaoai:latest
az ml environment create -f environment.yaml --subscription astalatiext -g dataai -w dataaiamlwks


docker pull mcr.microsoft.com/azureml/curated/llm-dbcopilot-embeddings:12
docker login docker.io
docker tag mcr.microsoft.com/azureml/curated/llm-dbcopilot-embeddings:12 akshata13/entaoai
docker push akshata13/entaoai:latest
az ml environment create -f environment.yaml --subscription astalatiext -g dataai -w dataaiamlwks


# Build locally instead of building on Azure
docker build . -t akshata13/entaoai:latest
docker push akshata13/entaoai:latest
az ml environment create -f environment.yaml --subscription astalatiext -g dataai -w dataaiamlwks
# Attach the runtime to new environment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions api/PromptFlow/Environment/entaoai/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json
name: entaoai
image: akshata13/entaoai:latest
inference_config:
liveness_route:
port: 8080
path: /health
readiness_route:
port: 8080
path: /health
scoring_route:
port: 8080
path: /score
4 changes: 4 additions & 0 deletions api/PromptFlow/Environment/entaoai/environment_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$schema: https://azuremlschemas.azureedge.net/latest/environment.schema.json
name: entaoai
build:
path: .
15 changes: 15 additions & 0 deletions api/PromptFlow/Environment/entaoai/extra_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Install dbcopilot
--extra-index-url https://azuremlsdktestpypi.azureedge.net/dbcopilot
dbcopilot==0.4.20230809.3
--extra-index-url https://azuremlsdktestpypi.azureedge.net/dbcopilottool
db_copilot_tool==0.1.8
# ## Install promptflow
# --extra-index-url https://azuremlsdktestpypi.azureedge.net/promptflow/promptflow
# promptflow==0.1.0b4
# --extra-index-url https://azuremlsdktestpypi.azureedge.net/promptflow-tools/
# promptflow-tools==0.1.0b5
# --extra-index-url https://azuremlsdktestpypi.azureedge.net/promptflow/promptflow-vectordb
# promptflow_vectordb==0.1.1
# ## Install embeddingstore
# --extra-index-url https://azuremlsdktestpypi.azureedge.net/embeddingstore/
# embeddingstore==0.0.1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
85 changes: 85 additions & 0 deletions api/PromptFlow/Environment/entaoai/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#azure-search-documents==11.4.0b4
azure-cosmos==4.4.0b1
./azure_search_documents-11.4.0b4-py3-none-any.whl
#./db_copilot_tool-0.1.8-py3-none-any.whl
#./dbcopilot-0.4.20230809.3-py3-none-any.whl
#./embeddingstore-0.1.1-py3-none-any.whl
#./prompt_flow_tools-0.0.6-py3-none-any.whl
# ./promptflow_sdk_bundle-0.0.101840849-py3-none-any.whl
# ./promptflow_sdk-0.0.99888568-py3-none-any.whl
#./promptflow_tools-0.1.0b5-py3-none-any.whl
# ./promptflow_vectordb-0.1.1-py3-none-any.whl
# ./promptflow-0.1.0b4-py3-none-any.whl
h11==0.14.0
httpcore==0.16.3
httpx==0.23.3
huggingface-hub==0.12.0
idna==3.4
importlib-metadata==6.0.0
isodate==0.6.1
#jq==1.4.1
joblib==1.2.0
langchain==0.0.266
langchain-experimental==0.0.9
langsmith==0.0.23
litellm==0.1.400
loguru==0.6.0
lxml==4.9.2
Markdown==3.4.1
marshmallow==3.19.0
marshmallow-enum==1.5.1
mmh3==3.0.0
monotonic==1.6
msal==1.21.0
msal-extensions==1.0.0
msrest==0.7.1
multidict==6.0.4
mypy-extensions==1.0.0
nltk==3.8.1
numpy==1.23.5
oauthlib==3.2.2
openai==0.27.8
openpyxl==3.1.2
packaging==23.0
pandas==1.5.3
pathos==0.2.9
pdfminer.six==20221105
Pillow==9.4.0
pinecone-client==2.2.1
portalocker==2.7.0
pycparser==2.21
pycryptodomex==3.17
pydantic==1.10.6
Pygments==2.14.0
PyJWT==2.6.0
pymilvus==2.2.2
pyodbc==4.0.35
pymupdf==1.21.1
python-dateutil==2.8.2
python-docx==0.8.11
python-magic==0.4.27
python-pptx==0.6.21
pytz==2022.7.1
PyYAML==6.0
redis==4.4.2
regex==2022.10.31
requests==2.31.0
requests-oauthlib==1.3.1
rfc3986==1.5.0
rich==13.0.1
six==1.16.0
sniffio==1.3.0
SQLAlchemy==1.4.48
tabulate==0.9.0
tenacity==8.2.2
tiktoken==0.4.0
tqdm==4.65.0
typing-inspect==0.8.0
typing_extensions==4.5.0
ujson==5.4.0
unstructured==0.5.2
urllib3==1.26.15
wrapt==1.14.1
XlsxWriter==3.0.9
yarl==1.8.2
zipp==3.15.0

0 comments on commit 334b190

Please sign in to comment.