forked from opencog/opencog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
71 lines (58 loc) · 1.99 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Primary OpenCog Dockerfile
#
# Usage: docker build -t $USER/opencog .
# docker run -it $USER/opencog
#
FROM ubuntu:14.04
MAINTAINER David Hart "[email protected]"
MAINTAINER Linas Vepstas "[email protected]"
RUN apt-get update
RUN apt-get -y install software-properties-common python-pip
# Use the ocpkg tool to install repositories and dependencies
COPY scripts/ocpkg /tmp/install-dependencies-trusty
COPY opencog/python/requirements.txt /tmp/
RUN chmod +x /tmp/install-dependencies-trusty
RUN /tmp/install-dependencies-trusty
RUN pip install -U -r /tmp/requirements.txt
# Tools
RUN apt-get -y install git wget
RUN apt-get -y install rlwrap telnet netcat-openbsd
# Environment Variables
## Set Locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Create and switch user. The user is privileged with no password required
RUN adduser --disabled-password --gecos "OpenCog Developer" opencog
RUN adduser opencog sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER opencog
# Get the things that ockpg didn't get.
# First, sureal needs link-grammar...
RUN mkdir /home/opencog/src
WORKDIR /home/opencog/src
# Link Parser -- changes often
# Download the current released version of link-grammar.
# The wget gets the latest version w/ wildcard
RUN wget -r --no-parent -nH --cut-dirs=2 http://www.abisource.com/downloads/link-grammar/current/
RUN tar -zxf current/link-grammar-5*.tar.gz
RUN rm -r current
RUN (cd link-grammar-5.*/; mkdir build; cd build; ../configure; make -j6; sudo make install; sudo ldconfig)
RUN git clone https://github.com/opencog/opencog
RUN (cd opencog; mkdir build; cd build; cmake ..; make -j6)
# Defaults
## cogserver shell ports
EXPOSE 17001 18001
## REST api
EXPOSE 5000
## ports on which OpenCog's unity3d game communicates with opencog_embodiment
### port from opencog's embodiment code
EXPOSE 16313
### ports from the unity3d game code
EXPOSE 16315 16312
## Default postgresql port
EXPOSE 5432
# Docker defaults
CMD bash