Skip to content

Commit

Permalink
Fix DBCopilot environment vulnerabilities (#2448)
Browse files Browse the repository at this point in the history
* Fix DBCopilot environment vulnerabilities

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
  • Loading branch information
ricardrao authored Mar 7, 2024
1 parent 2e39230 commit fe40522
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
output_chunk_file:
type: uri_folder
output_grounding_context_file: ${{parent.outputs.db_context}}
component: "azureml:llm_dbcopilot_grounding:0.0.47"
component: "azureml:llm_dbcopilot_grounding:0.0.48"
type: command
generate_meta_embeddings:
type: command
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
#########################################
db_sample_loading_generator:
type: command
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.23"
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.24"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down Expand Up @@ -303,5 +303,5 @@ jobs:
path: ${{parent.inputs.llm_config}}
runtime:
path: ${{parent.inputs.runtime}}
component: "azureml:llm_dbcopilot_create_promptflow:0.0.47"
component: "azureml:llm_dbcopilot_create_promptflow:0.0.48"
type: command
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
output_chunk_file:
type: uri_folder
output_grounding_context_file: ${{parent.outputs.db_context}}
component: "azureml:llm_dbcopilot_grounding:0.0.47"
component: "azureml:llm_dbcopilot_grounding:0.0.48"
type: command
generate_meta_embeddings:
type: command
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
#########################################
db_sample_loading_generator:
type: command
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.23"
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.24"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down Expand Up @@ -287,5 +287,5 @@ jobs:
path: ${{parent.inputs.llm_config}}
runtime:
path: ${{parent.inputs.runtime}}
component: "azureml:llm_dbcopilot_create_promptflow:0.0.47"
component: "azureml:llm_dbcopilot_create_promptflow:0.0.48"
type: command
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
#########################################
db_meta_loading_generator:
type: command
component: "azureml:llm_dbcopilot_grounding:0.0.47"
component: "azureml:llm_dbcopilot_grounding:0.0.48"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
#########################################
db_sample_loading_generator:
type: command
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.23"
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.24"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
#########################################
endpoint_deployment_job:
type: command
component: "azureml:llm_dbcopilot_deploy_endpoint:0.0.23"
component: "azureml:llm_dbcopilot_deploy_endpoint:0.0.24"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
#########################################
db_meta_loading_generator:
type: command
component: "azureml:llm_dbcopilot_grounding:0.0.47"
component: "azureml:llm_dbcopilot_grounding:0.0.48"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
#########################################
db_sample_loading_generator:
type: command
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.23"
component: "azureml:llm_dbcopilot_grounding_ground_samples:0.0.24"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
#########################################
endpoint_deployment_job:
type: command
component: "azureml:llm_dbcopilot_deploy_endpoint:0.0.23"
component: "azureml:llm_dbcopilot_deploy_endpoint:0.0.24"
resources:
instance_count: ${{parent.inputs.serverless_instance_count}}
instance_type: ${{parent.inputs.serverless_instance_type}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tags:
Preview: ""
name: llm_dbcopilot_create_promptflow
display_name: LLM - Create DBCopilot Prompt Flow
version: 0.0.47
version: 0.0.48
inputs:
index_name:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: command
tags: {}
name: llm_dbcopilot_deploy_endpoint
display_name: LLM - DBCopilot Deploy Endpoint Component
version: 0.0.23
version: 0.0.24
inputs:
deployment_name:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: command
tags:
Preview: ""
name: llm_dbcopilot_grounding
version: 0.0.47
version: 0.0.48
inputs:
asset_uri:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: command
tags: {}
name: llm_dbcopilot_grounding_ground_samples
display_name: LLM - DBCopilot Grounding Ground Samples Component
version: 0.0.23
version: 0.0.24
inputs:
grounding_context:
type: uri_folder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM mcr.microsoft.com/azureml/promptflow/promptflow-runtime-stable:{{latest-image-tag}}

USER root

# Set the shared environment path
ENV AZUREML_CONDA_ENVIRONMENT_PATH /azureml-envs/dbcopilot
ENV PATH $AZUREML_CONDA_ENVIRONMENT_PATH/bin:$PATH

# Create conda environment
COPY conda_dependencies.yaml .
RUN conda env create -p $AZUREML_CONDA_ENVIRONMENT_PATH -f conda_dependencies.yaml -q && \
Expand All @@ -16,10 +16,13 @@ RUN apt-get update && apt-get install -y \
curl \
gnupg \
unixodbc-dev \
# Upgrade libldap to the required version
openssl=1.1.1f-1ubuntu2.22 \
libssl1.1=1.1.1f-1ubuntu2.22 \
libldap-2.4-2=2.4.49+dfsg-2ubuntu1.10 \
libldap-common=2.4.49+dfsg-2ubuntu1.10 && \
apt-get install --only-upgrade openssl=1.1.1f-1ubuntu2.21 libssl1.1=1.1.1f-1ubuntu2.21 && \
libldap-common=2.4.49+dfsg-2ubuntu1.10 \
login=1:4.8.1-1ubuntu5.20.04.5 \
passwd=1:4.8.1-1ubuntu5.20.04.5 \
uidmap=1:4.8.1-1ubuntu5.20.04.5 && \
rm -rf /var/lib/apt/lists/*

# Import the public repository GPG keys
Expand All @@ -46,7 +49,11 @@ RUN pip install opentelemetry-instrumentation-django==0.42b0 promptflow-image-bu
## Install dbcopilot
RUN pip install https://ragsample.blob.core.windows.net/ragdata/wheels/dbcopilot/db_copilot_tool-0.1.16-py3-none-any.whl

RUN pip install cryptography==42.0.0 langchain==0.0.348 pyarrow==14.0.1 pymongo==4.6.1
RUN /bin/bash -c "source /opt/miniconda/etc/profile.d/conda.sh && \
conda activate azureml-envs/prompt-flow/runtime && \
pip install cryptography==42.0.0 && \
conda deactivate" && \
pip install cryptography==42.0.0 langchain==0.0.348 pyarrow==14.0.1 pymongo==4.6.1

# Install certificates and other utilities
RUN set -eux; \
Expand All @@ -70,4 +77,4 @@ ENV LANG C.UTF-8
ENV JAVA_VERSION 21-ea+22

COPY setup.sh .
RUN bash setup.sh
RUN bash setup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
promptflow[azure]==1.5.0
promptflow-tools==1.2.0
promptflow[azure]==1.6.0
promptflow-tools==1.3.0
promptflow-vectordb==0.2.4
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
promptflow[azure]==1.5.0
promptflow-tools==1.2.0
promptflow[azure]==1.6.0
promptflow-tools==1.3.0
promptflow-vectordb==0.2.4

0 comments on commit fe40522

Please sign in to comment.