First working draft of kafka for inference app
[demo.git] / vnfs / DAaaS / microservices / PythonApps / python-kafkaConsumer-inference-app / src / Dockerfile
1 # Python image to use.
2 FROM python:3.8
3
4 # Set the working directory to /src/hdfs-writer
5 WORKDIR /src/inferenceApp
6
7 # Install librdkafka
8 RUN mkdir /librdkafka-dir && cd /librdkafka-dir
9 RUN git clone https://github.com/edenhill/librdkafka.git && \
10 cd librdkafka && \
11 ./configure --prefix /usr && \
12 make && \
13 make install
14
15 #RUN export PYTHONPATH="/usr/bin/python3:/src/python-kafkaconsumer-inference-app/"
16
17 # copy the requirements file used for dependencies
18 COPY requirements.txt .
19
20 # Install any needed packages specified in requirements.txt
21 RUN pip install --trusted-host pypi.python.org -r requirements.txt
22
23 RUN pip install confluent-kafka
24 RUN pip install python-dateutil
25
26 # Install ptvsd for debugging
27 RUN pip install ptvsd
28
29
30
31 # Copy the rest of the working directory contents into the container at /app
32 COPY . ./
33
34 # Start the server when the container launches
35 CMD ["python3", "-m", "ptvsd", "--host", "localhost", "--port", "5000", "--wait", "/src/inferenceApp/main.py"]