Skip to content

Instantly share code, notes, and snippets.

@krasnobaev
Created October 31, 2016 03:09
Show Gist options
  • Save krasnobaev/6f589ea2e6b6c971ff1b0e56ac2db263 to your computer and use it in GitHub Desktop.
Save krasnobaev/6f589ea2e6b6c971ff1b0e56ac2db263 to your computer and use it in GitHub Desktop.
FROM ubuntu:16.10
MAINTAINER Aleksey Krasnobaev <https://github.com/krasnobaev>
# https://www.digitalocean.com/community/tutorials/docker-explained-how-to-containerize-python-web-applications
RUN apt-get update ; \
DEBIAN_FRONTEND=noninteractive apt-get -y install python python-dev python-distribute python-pip \
wget git
# following instructions in https://explosion.ai/blog/chatbot-node-js-spacy
# 1. INSTALL SPACY AND SOCKET.IO
RUN pip install -U socketIO-client
RUN pip install -U spacy
RUN python -m spacy.en.download
# 2. INSTALL NEO4J FOR MAC OR LINUX
RUN wget -O - https://debian.neo4j.org/neotechnology.gpg.key | apt-key add - ; \
echo 'deb http://debian.neo4j.org/repo stable/' | tee /etc/apt/sources.list.d/neo4j.list
RUN apt-get update ; \
DEBIAN_FRONTEND=noninteractive apt-get -y install neo4j npm
# 3. INSTALL AIVA INTERFACE
RUN git clone https://github.com/krasnobaev/aiva
WORKDIR aiva
RUN git checkout cgkb
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install curl
RUN sed -e "s/sudo -E//g" -i bin/setup
RUN sed -e "s/sudo//g" -i bin/setup
RUN sed -i '3i/^/DEBIAN_FRONTEND=noninteractive\n/' bin/setup
RUN curl https://bootstrap.pypa.io/get-pip.py | python3
RUN python3 -m pip install -U setuptools
RUN npm run setup
# 4. START NEO4J
RUN service neo4j start
# 5. CONFIGURE YOUR BOT
COPY default.json ./aiva/config/default.json
# 6. START THE BOT
CMD npm start --debug
@awebartisan
Copy link

Hi. Can you share the server specs needed to run spacy??

@krasnobaev
Copy link
Author

Sorry, I created this config for someone else. Never have used this thing in production by myself. Server was my old opteron 1214/8GB RAM or one of the cheapest Digital Ocean instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment