forked from opencog/atomspace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "remove everything except the util directories"
This reverts commit ca4780d.
- Loading branch information
Showing
2,103 changed files
with
459,253 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
bin*/* | ||
build*/* | ||
.git | ||
tags/* | ||
.pyc | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# | ||
# Primary OpenCog Dockerfile | ||
# | ||
# Usage: docker build -t $USER/opencog . | ||
# docker run --name="my_cog" -p 17001:17001 -p 18001:18001 -it $USER/opencog | ||
# docker exec -it my_cog bash | ||
# | ||
FROM ubuntu:14.04 | ||
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 | ||
RUN apt-get -y install gdb python2.7-dbg | ||
|
||
# Copy the .gdbinit file so we can debug the CogServer | ||
COPY scripts/.gdbinit ~/.gdbinit | ||
|
||
# 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 -j4; 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 -j4) | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
------------------------------------------------------------------------------- | ||
CODE STYLE | ||
|
||
In order to keep the code nice and clean we have a few requirements you'll | ||
need to stick to in order to get your patch accepted: | ||
|
||
- use 4 spaces for indentation | ||
- use 80 columns max | ||
- use unix-style end-of-lines (all decent win32 editors support it) | ||
- use definition-block brackets on a new line and command-block brackets | ||
on the same line | ||
- use spaces between expression operators ("i + 1" instead of "i+1") | ||
|
||
To check wheter your code complies with our standard, you may use the tool | ||
"astyle". Make sure you use the following options: | ||
|
||
prompt-$ astyle --indent=spaces=4 --brackets=linux --indent-labels \ | ||
--pad=oper --one-line=keep-statements --convert-tabs \ | ||
--indent-preprocessor file.cc | ||
prompt-$ diff file.cc file.cc.orig | ||
|
||
See also http://wiki.opencog.org/w/Development_standards | ||
|
||
|
||
------------------------------------------------------------------------------- | ||
VIM USERS | ||
|
||
If you use the VIM editor, you may add the following line to you ".vimrc" | ||
configuration file to automatically setup your editor to use opencog's style | ||
when editing a source file from opencog's tree: | ||
|
||
autocmd BufNewFile,BufReadPost * if match(expand("%:p:h"), "/opencog") >= 0 && &filetype == "cpp" | set ts=4 sw=4 tw=80 ff=unix cindent expandtab | endif | ||
|
||
|
||
------------------------------------------------------------------------------- | ||
EMACS USERS | ||
|
||
If you use Emacs, you may add the following lines to your ".emacs" as well: | ||
|
||
(setq-default indent-tabs-mode nil) ;; use spaces instead of tab | ||
(setq-default c-basic-offset 4) ;; set c based language indent to 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# -*- mode: ruby -*- | ||
# # vi: set ft=ruby : | ||
|
||
# QuickStart | ||
# 1. vagrant up | ||
# 2. vagrant ssh | ||
# | ||
# Windows note: before running the above commands, you must make sure that 'ssh' | ||
# is in your system path. After downloading 'git', you should go to your control | ||
# panel, and edit your Environment Variables and append the folder containing | ||
# ssh to the system path. For example: C:\Program Files (x86)\Git\bin | ||
# | ||
# Optional | ||
# 1. Change Ubuntu archive mirror to a local mirror | ||
# 2. Change vb.customize memory and cpus values | ||
# 3. On Linux hosts, use provider vagrant-lxc | ||
# More | ||
# http://wiki.opencog.org/w/Setup_OpenCog_development_environment_VM_using_Vagrant | ||
# http://wiki.opencog.org/w/Building_OpenCog | ||
|
||
Vagrant.configure("2") do |config| | ||
|
||
# Enable networking; see http://stackoverflow.com/a/18457420/1695962 | ||
config.vm.provider "virtualbox" do |v| | ||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | ||
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | ||
end | ||
|
||
# 64-bit machine caused a fatal issue: http://stackoverflow.com/a/22575302/1695962 | ||
config.vm.box = "trusty32" | ||
config.vm.box_url = "http://files.vagrantup.com/trusty32.box" | ||
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box" | ||
config.vm.hostname = "cogbox" | ||
config.vm.provision "shell", inline: "sed -i 's:/archive.ubuntu.com:/hk.archive.ubuntu.com:g' /etc/apt/sources.list" | ||
config.vm.provision "shell", inline: "apt-get update -y" | ||
config.vm.provision "shell", inline: "apt-get install software-properties-common -y" | ||
config.vm.provision "shell", inline: "ln -v -s /vagrant /usr/local/src/opencog" | ||
config.vm.provision "shell", inline: "ln -v -s /vagrant /home/vagrant/opencog" | ||
config.vm.provision "shell", inline: "cp -v /vagrant/scripts/ocpkg /install-dependencies-trusty" | ||
# Fix the line endings on Windows, from http://stackoverflow.com/a/17131379/1695962 | ||
config.vm.provision "shell", inline: "perl -i -pe 'y|\r||d' /install-dependencies-trusty" | ||
config.vm.provision "shell", inline: "/install-dependencies-trusty" | ||
|
||
# Port forwarding for REST API | ||
config.vm.network "forwarded_port", guest: 5000, host: 5000 | ||
|
||
# Set --host to 192.168.50.2 when running opencog-server.sh in RelEx, | ||
# to pass RelEx's OpenCog scheme output to cogbox. | ||
config.vm.network "private_network", ip: "192.168.50.2" | ||
|
||
# Configure port for telnet access to shell | ||
config.vm.network "forwarded_port", guest: 17001, host: 17001 | ||
|
||
# Enable X-Forwarding | ||
config.ssh.forward_x11 = true | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
vb.name = "cogbox" | ||
vb.customize [ | ||
"modifyvm", :id, | ||
"--memory", "2048", | ||
"--name", "opencog-dev-vm", | ||
"--cpus", "1" | ||
] | ||
end | ||
end |
Binary file not shown.
Oops, something went wrong.