diff --git a/Docker/Dockerfile b/Docker/Dockerfile new file mode 100644 index 0000000..ff5e249 --- /dev/null +++ b/Docker/Dockerfile @@ -0,0 +1,57 @@ +FROM ubuntu:18.04 + +#ARG CACHEBUST + +RUN echo 1 && apt-get update && apt-get install -y apt-utils sudo + + +RUN adduser --disabled-password --gecos "snetservice user" top && \ + adduser top sudo && \ + echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +USER top + +#RUN whoami + +RUN sudo apt-get install -y git \ + build-essential \ + python3.6 \ + python3.6-dev \ + python3-pip + +RUN sudo apt-get install -y wget curl vim + + +WORKDIR /home/top/ + +RUN curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6 + +RUN pip --version + + +WORKDIR /tmp + +COPY requirements.txt /tmp/ +RUN sudo pip install -r requirements.txt +RUN echo 1 +RUN python3.6 -m nltk.downloader all + + +WORKDIR /home/top/ +RUN mkdir dep +WORKDIR /home/top/dep + +#RUN git clone https://github.com/singnet/network-analytics-services.git && \ +# cd network-analytics-services + +RUN whoami + +RUN echo 13 && \ + git clone https://github.com/edyirdaw/topic-analysis.git && cd topic-analysis && git checkout --track origin/dev + +WORKDIR /home/top/dep/topic-analysis + +RUN pwd +RUN python3.6 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. service_spec/topic_analysis.proto + + diff --git a/Docker/requirements.txt b/Docker/requirements.txt new file mode 100644 index 0000000..9befa89 --- /dev/null +++ b/Docker/requirements.txt @@ -0,0 +1,12 @@ +jsonrpcserver +jsonrpcclient +grpcio +grpcio_tools +numpy +pandas +scipy +psutil +tables +matplotlib +nltk +stemming==1.0 diff --git a/snet_test_client.py b/snet_test_client.py index 0593e29..060eff4 100644 --- a/snet_test_client.py +++ b/snet_test_client.py @@ -58,7 +58,8 @@ def csv_reader(): def try_plsa(): - channel = grpc.insecure_channel('localhost:5000') + channel = grpc.insecure_channel('localhost:500') + # channel = grpc.insecure_channel('172.17.0.75:5001') stub = topic_analysis_pb2_grpc.TopicAnalysisStub(channel)