From 873f1a3885e45ad9939c5f2d45b210d400108404 Mon Sep 17 00:00:00 2001 From: SANDEEP KUMAR JAISAWAL Date: Wed, 9 Nov 2022 12:25:15 +0530 Subject: [PATCH] Build related files for data extraction repo Issue-id: AIMLWF-5 Signed-off-by: SANDEEP KUMAR JAISAWAL Change-Id: Ica0726237ba15a285b89df9d195fdec974c64f61 --- Dockerfile | 33 +++++++++++++++++++++++++++++++++ container-tag.yaml | 21 +++++++++++++++++++++ requirements.txt | 12 ++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 Dockerfile create mode 100644 container-tag.yaml create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1cd87a8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +#Base Image +FROM ubuntu:18.04 + +# location in the container +ENV TA_DIR /home/app/ + +# Install dependencies +RUN apt-get update && apt-get install -y \ + python3 && apt-get install -y \ + python3-pip + +# Install OpenJDK-8 for Spark +RUN apt-get update && \ + apt-get install openjdk-8-jre openjdk-8-jdk -y && \ + apt-get clean; + +RUN apt-get update && \ + apt-get install scala=2.11.12-4~18.04 -y && \ + apt-get clean; + +# Setup JAVA_HOME -- useful for docker commandline +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/ +RUN export JAVA_HOME + +WORKDIR ${TA_DIR} +# Copy sources into the container +COPY . . + +#Install the pip3 requirements +RUN pip3 install -r requirements.txt + +#Expose the ports +EXPOSE 5000 diff --git a/container-tag.yaml b/container-tag.yaml new file mode 100644 index 0000000..d23cae5 --- /dev/null +++ b/container-tag.yaml @@ -0,0 +1,21 @@ +# ================================================================================== +# +# Copyright (c) 2022 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. +# +# ================================================================================== + # The Jenkins job requires a tag to build the Docker image. + # Global-JJB script assumes this file is in the repo root. +--- +tag: 1.0.0 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bab7db6 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,12 @@ +pyspark==3.1.2 +cassandra-driver==3.25.0 +json5==0.9.6 +influxdb-client==1.20.0 +pandas==1.1.5 +importlib-metadata==4.8.1 +lru-dict==1.1.7 +jsonpickle==2.0.0 +Flask==2.0.1 +Flask-API==3.0.post1 +Flask-RESTful==0.3.9 +PyYAML==3.12 -- 2.16.6