From 12ba51035dd1cadf0e47775ef7561bbe857fa727 Mon Sep 17 00:00:00 2001 From: josephthaliath Date: Thu, 25 May 2023 13:10:59 +0530 Subject: [PATCH] Changes to build default pipeline image as part of installation Issue-Id: AIMLFW-35 Change-Id: Ib188202070118ec20b08ec59a706299c9056f06f Signed-off-by: josephthaliath --- bin/build_default_pipeline_image.sh | 19 +++++++++++++++++++ bin/install_traininghost.sh | 1 + demos/hrelease/scripts/push_qoe_data.sh | 3 +-- tools/kubeflow/Dockerfile.pipeline | 24 +++++++++++------------- tools/kubeflow/requirements_pipeline.txt | 26 ++++++++++++++++++++++++++ 5 files changed, 58 insertions(+), 15 deletions(-) create mode 100755 bin/build_default_pipeline_image.sh create mode 100644 tools/kubeflow/requirements_pipeline.txt diff --git a/bin/build_default_pipeline_image.sh b/bin/build_default_pipeline_image.sh new file mode 100755 index 0000000..5d985e0 --- /dev/null +++ b/bin/build_default_pipeline_image.sh @@ -0,0 +1,19 @@ +# ================================================================================== +# +# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ================================================================================== + +docker build -f tools/kubeflow/Dockerfile.pipeline -t traininghost/pipelineimage:latest tools/kubeflow/. diff --git a/bin/install_traininghost.sh b/bin/install_traininghost.sh index 0634df5..80fe32a 100755 --- a/bin/install_traininghost.sh +++ b/bin/install_traininghost.sh @@ -33,6 +33,7 @@ tools/helm/install_helm.sh tools/nfs/install_nfs_subdir_external_provisioner.sh localhost bin/install_common_templates_to_helm.sh +bin/build_default_pipeline_image.sh tools/leofs/bin/install_leofs.sh tools/kubeflow/bin/install_kubeflow.sh kubectl create namespace traininghost diff --git a/demos/hrelease/scripts/push_qoe_data.sh b/demos/hrelease/scripts/push_qoe_data.sh index 9708715..1d3b30b 100755 --- a/demos/hrelease/scripts/push_qoe_data.sh +++ b/demos/hrelease/scripts/push_qoe_data.sh @@ -24,10 +24,9 @@ if [ $# -lt 3 ]; then fi kubectl patch StatefulSet pm-https-server -n ran -p '{"spec":{"template":{"spec":{"containers":[{"name":"pm-https-server", "env":[{"name":"ALWAYS_RETURN", "value":""}]}]}}}}' -sleep 20 while [[ $(kubectl get pods pm-https-server-0 -n ran -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "waiting for pm-https-server to be up" && sleep 1; done kubectl exec -it pm-https-server-0 -n ran -- mkdir -p /files -sudo apt install python3-pip +sudo apt install -y python3-pip pip3 install pandas wget https://raw.githubusercontent.com/o-ran-sc/ric-app-qp/g-release/src/cells.csv -O qoedata.csv python3 qoedatapush.py $1 $2 $3 diff --git a/tools/kubeflow/Dockerfile.pipeline b/tools/kubeflow/Dockerfile.pipeline index c9ed8b2..4d43f70 100644 --- a/tools/kubeflow/Dockerfile.pipeline +++ b/tools/kubeflow/Dockerfile.pipeline @@ -16,18 +16,16 @@ # # ================================================================================== -FROM python:3.8 -RUN pip3 install protobuf==3.20.1 -RUN pip3 install tensorflow==2.5.0 -RUN pip3 install cassandra-driver==3.25.0 -RUN pip3 install pandas==1.4.4 -RUN pip3 install scikit-learn -RUN pip3 install boto3 -RUN pip3 install botocore -RUN pip3 install kubernetes -ADD SDK /SDK -WORKDIR /SDK -RUN pip3 install featurestoresdk_main/. -RUN pip3 install modelmetricssdk_main/. +FROM python:3.8-slim +RUN apt-get update && \ + apt-get install -y git +COPY requirements_pipeline.txt . +RUN pip3 install -r requirements_pipeline.txt + +RUN git clone -b g-release "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/feature-store" /SDK/featurestoresdk_main +RUN git clone -b g-release "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/sdk/model-storage" /SDK/modelmetricssdk_main + +RUN pip3 install /SDK/featurestoresdk_main/. +RUN pip3 install /SDK/modelmetricssdk_main/. RUN mkdir -p /app_run WORKDIR /app_run diff --git a/tools/kubeflow/requirements_pipeline.txt b/tools/kubeflow/requirements_pipeline.txt new file mode 100644 index 0000000..a180207 --- /dev/null +++ b/tools/kubeflow/requirements_pipeline.txt @@ -0,0 +1,26 @@ +# ================================================================================== +# +# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ================================================================================== + +protobuf==3.20.1 +tensorflow==2.5.0 +cassandra-driver==3.25.0 +pandas==1.4.4 +scikit-learn +kubernetes +boto3 +botocore -- 2.16.6