forked from opencog/atomspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-utopic
81 lines (65 loc) · 2.38 KB
/
Dockerfile-utopic
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
72
73
74
75
76
77
78
79
80
81
#
# Primary OpenCog Dockerfile (Ubunutu Utopic version)
#
# Usage: docker build -f Dockerfile-utopic -t $USER/opencog:utopic .
# docker run --name="my_cog" -p 17001:17001 -p 18001:18001 -it $USER/opencog:utopic
# docker exec -it my_cog bash
#
FROM ubuntu:14.10
MAINTAINER David Hart "[email protected]"
MAINTAINER Linas Vepstas "[email protected]"
# Change line below on rebuild. Will use cache up to this line.
ENV LAST_OS_UPDATE 2015-02-18
RUN apt-get update
RUN apt-get -y upgrade
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
RUN mkdir /home/opencog/src
WORKDIR /home/opencog/src
# Change line below on rebuild. Will use cache up to this line.
ENV LAST_SOFTWARE_UPDATE 2015-02-18
# Get the things that ockpg didn't get.
# First, sureal needs link-grammar...
# 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 -j12; sudo make install; sudo ldconfig)
# Now, OpenCog itself.
RUN git clone https://github.com/opencog/opencog
RUN (cd opencog; mkdir build; cd build; cmake ..; make -j12)
# 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