Changes to build default pipeline image as part of installation 16/11216/2
authorjosephthaliath <jo.thaliath@samsung.com>
Thu, 25 May 2023 07:40:59 +0000 (13:10 +0530)
committerjosephthaliath <jo.thaliath@samsung.com>
Thu, 25 May 2023 08:20:57 +0000 (13:50 +0530)
Issue-Id: AIMLFW-35

Change-Id: Ib188202070118ec20b08ec59a706299c9056f06f
Signed-off-by: josephthaliath <jo.thaliath@samsung.com>
bin/build_default_pipeline_image.sh [new file with mode: 0755]
bin/install_traininghost.sh
demos/hrelease/scripts/push_qoe_data.sh
tools/kubeflow/Dockerfile.pipeline
tools/kubeflow/requirements_pipeline.txt [new file with mode: 0644]

diff --git a/bin/build_default_pipeline_image.sh b/bin/build_default_pipeline_image.sh
new file mode 100755 (executable)
index 0000000..5d985e0
--- /dev/null
@@ -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/.
index 0634df5..80fe32a 100755 (executable)
@@ -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
index 9708715..1d3b30b 100755 (executable)
@@ -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
index c9ed8b2..4d43f70 100644 (file)
 #
 # ==================================================================================
 
-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 (file)
index 0000000..a180207
--- /dev/null
@@ -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