Skip to content

Commit

Permalink
Small update for duckling and docker (#4)
Browse files Browse the repository at this point in the history
1. Relax the constraint to find duckling pid
2. Update docs with port mapping for duckling docker
3. Docker container does not need mindmeld config
4. ES cluster name to be mindmeld
  • Loading branch information
minhtuev committed May 2, 2019
1 parent f94c09b commit d759a69
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
3 changes: 1 addition & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ RUN chown -R mindmeld:mindmeld /elasticsearch /data /var/log
# Add Config Files
COPY ./conf/elasticsearch.yml /elasticsearch/config/elasticsearch.yml

COPY ./conf/config.cfg /root/.mindmeld/config

WORKDIR /root

RUN curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
Expand All @@ -67,6 +65,7 @@ RUN pip3 install --upgrade pip
RUN pip3 install -U mindmeld
RUN pip3 install click-log==0.1.8

ARG REBUILD_BLUEPRINT=unknown
RUN mkdir -p home_assistant && \
wget https://devcenter.mindmeld.com/bp/home_assistant/app.tar.gz -P /root/projects/ && \
tar -xvf /root/projects/app.tar.gz -C ./home_assistant
Expand Down
3 changes: 0 additions & 3 deletions docker/conf/config.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion docker/conf/elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# Use a descriptive name for your cluster:
#
cluster.name: wb3
cluster.name: mindmeld
#
# ------------------------------------ Node ------------------------------------
#
Expand Down
7 changes: 1 addition & 6 deletions mindmeld/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,8 @@ def num_parser(start):


def _get_duckling_pid():
os_path = _find_duckling_os_executable()
if not os_path:
return

_, filename = os.path.split(os_path)
pid = []
for line in os.popen('ps ax | grep %s | grep -v grep' % filename):
for line in os.popen('ps ax | grep duckling | grep -v grep'):
pid.append(line.split()[0])
return pid

Expand Down
2 changes: 1 addition & 1 deletion source/userguide/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ with MindMeld. You instead need to run the numerical parser using Docker as show

.. code-block:: shell
docker pull mindmeldworkbench/duckling:master && docker run mindmeldworkbench/duckling:master
docker pull mindmeldworkbench/duckling:master && docker run -p 0.0.0.0:7151:7151 mindmeldworkbench/duckling -ti -d
.. warning::
Expand Down

0 comments on commit d759a69

Please sign in to comment.