diff options
author | 2019-11-01 00:30:30 +0000 | |
---|---|---|
committer | 2019-11-14 14:10:09 +0000 | |
commit | 53c9fab327d1d9a079154b01242cf0930c106989 (patch) | |
tree | 4cc6bc25a290c6ac3e6028122192de1dd9493646 /vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/Dockerfile | |
parent | fb9b7baa506e5c92bc243a30364e9f72ecd9c3f1 (diff) |
First working draft of kafka for inference app
Created a python based inference app which can query a given metrics for
a given duration from kafka topic.
Consumer runs on separate thread and doesnt interfere with the main app.
Issue-ID: ONAPARC-528
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: Ic84ea137b134385246bf11dee2ed6d34b593b956
Diffstat (limited to 'vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/Dockerfile')
-rw-r--r-- | vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/Dockerfile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/Dockerfile b/vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/Dockerfile new file mode 100644 index 00000000..8c5d822d --- /dev/null +++ b/vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/Dockerfile @@ -0,0 +1,35 @@ +# Python image to use. +FROM python:3.8 + +# Set the working directory to /src/hdfs-writer +WORKDIR /src/inferenceApp + +# Install librdkafka +RUN mkdir /librdkafka-dir && cd /librdkafka-dir +RUN git clone https://github.com/edenhill/librdkafka.git && \ +cd librdkafka && \ +./configure --prefix /usr && \ +make && \ +make install + +#RUN export PYTHONPATH="/usr/bin/python3:/src/python-kafkaconsumer-inference-app/" + +# copy the requirements file used for dependencies +COPY requirements.txt . + +# Install any needed packages specified in requirements.txt +RUN pip install --trusted-host pypi.python.org -r requirements.txt + +RUN pip install confluent-kafka +RUN pip install python-dateutil + +# Install ptvsd for debugging +RUN pip install ptvsd + + + +# Copy the rest of the working directory contents into the container at /app +COPY . ./ + +# Start the server when the container launches +CMD ["python3", "-m", "ptvsd", "--host", "localhost", "--port", "5000", "--wait", "/src/inferenceApp/main.py"]
\ No newline at end of file |