CogBuntu
From OpenCog
Contents |
What is Cogbuntu?
cogbuntu is a remixed version of Ubuntu Linux that includes all of OpenCog's major components (plus all necessary dependencies such as libraries, tools, etc.) pre-installed, pre-configured and ready-to-run!
cogbuntu is designed to run directly on your PC, Mac, or intel/AMD mini-supercomputer hardware in one (or more) of three possible configurations:
- on a temporary basis, as a live DVD
- in a dual-boot or multi-boot configuration, alongside your existing OS
(e.g. Linux, Windows, or Mac OS X) - concurrently with your existing OS, in a virtual machine
(i.e. VirtualBox, preferred for being free software, or VMWare).
cogbuntu is packaged as an Ubuntu Linux compatible install/live DVD, and is delivered in an ISO image file approximately 2GB in size. The reason it takes so much is because it contains OpenCog source and binary for live demonstration or code browsing. If one wants to use it as an install, and does not intend to use that [outdated] revision of OpenCog, he/she can safely remove the /OpenCog folder from the root directory.
See Building OpenCog for optional/additional instructions on how to download the complete OpenCog source code and build the OpenCog system's various components from scratch on your existing Ubuntu Linux system.
Why cogbuntu?
The first version of cogbuntu was made for the AGI Summer School in Xiamen in 2009, so that we could demonstrate OpenCog on the computers of Xiamen's University without installing OpenCog. It kept being maintained because it is a convenient way to demonstrate OpenCog without installing it or to install rapidly Ubuntu with all necessary tools and libs to work on OpenCog.
How to Get cogbuntu
Note that cogbuntu 11.10 hasn't been compiled yet (due to lack of time). However the script is ready so you can essentially get it by installing ubuntu 11.10 and running the script.
You can get cogbuntu 11.04 via torrent or web download. The minimal version contains all OpenCog's requirements + OpenCog itself (under /OpenCog).
- cogbuntu 11.04 Minimal (2.1GB) - 32-bit torrent - web - md5sum.
- cogbuntu 11.04 Minimal (2.1GB) - 64-bit torrent - web - md5sum.
The extended version contains additionally tools for developing like Emacs, Vim, Latex, etc...
- cogbuntu 11.04 (3.4GB) - 32-bit torrent - web - md5sum.
- cogbuntu 11.04 (3.4GB) - 64-bit torrent - web - md5sum.
Note: if you have trouble connecting to the tracker, try changing it to udp://tracker.openbittorrent.com:80/announce.
Please use the torrents preferentially, and in the case that there are not many seeds, please use the web download and then seed the iso to help others get the cogbuntu distribution. We also recommend using a download manager that supports resuming, since it's a big file and the connection may be interrupted. Thanks!
If getting Cogbuntu is too much trouble, you can always get Ubuntu and run the scripts used to build Cogbuntu to install all requirements, as explained here.
As a Live DVD
You can use it as a live DVD. So you can work on OpenCog while visiting your family without messing up their computer.
As an Install DVD
You can install it, and be able to work right away. Note that there are 3 additional directories at the root tree, /OpenCog, /Packages and /Sources. They are used for installation and live DVD but you probability don't need then once installed so feel free to remove then to save a few GBytes.
Running embodiment (controlled agent in a virtual world)
Must do 5 things
- install mysql-server
- run the petBrain (cogbuntu),
- run the multiverse proxy server (cogbuntu),
- run nlgen (cogbuntu)
- run the multiverse client (Windows)
First of all create an folder under the ubuntu account of the live session (or any other place, a flash disk for instance), it will contain all the necessary softwares to run Embodiment, let's call it OpenCog.
cd mkdir OpenCog
Install mysql-server
enter the command
sudo apt-get install mysql-server
A password for mysql root user is asked at the end of the installation. Choose a password and enter it (and enter it again when asked again). Let's denote that password MYSQL_ROOT_PASSWORD.
Run Embodiment
Copy the Embodiment executables under your OpenCog directory
cp -fr /OpenCog/opencog/dist/Embodiment ~/OpenCog
Or, if you want the last version, fetch it, compile it and install it (beware it takes at least 2GB of space once compiled)
cd OpenCog bzr branch lp:opencog cd opencog mkdir bin cd bin cmake .. make cd ../scripts/embodiment ./make_distribution bin Embodiment
Go under the directory Embodiment
cd OpenCog/Embodiment
(of course it will be cd opencog/dist/Embodiment if you have compiled it instead of copying it)
Run Embodiment
./start_embodiment.sh
Run the Multiverse proxy
Copy the Multiverse proxy under your OpenCog directory (need to be done only once)
cp -fr /OpenCog/embodiment_MV1.5-Proxy ~/OpenCog
Or if you want the last version, fetch it and compile it (refer to the README to configure it properly)
bzr branch lp:~opencog-dev/opencog/embodiment_MV1.5-Proxy cd embodiment_MV1.5-Proxy ant
Initialize the data base (need to be done only once)
cd ~/OpenCog/embodiment_MV1.5-Proxy/server/bin mysql --user=root --password=MYSQL_ROOT_PASSWORD < install.sql
Configure multiverse.properties and PetaverseProxy.properties, place the IP of the machine running cogbuntu (you can use the command ifconfig to get it), and enter the mysql password MYSQL_ROOT_PASSWORD:
for multiverse.properties
multiverse.msgsvr_hostname multiverse.proxyserver
multiverse.db_password
for PetaverseProxy.properties
MY_IP ROUTER_IP
Run the proxy
./multiverse.sh -v restart
Run NLGen
NLGen is not included in cogbuntu yet so you have to fetch it from the repository
cd ~/OpenCog bzr branch lp:nlgen cd nlgen
to run it just type
ant server
Run the multiverse client
Under OpenCog/embodiment_MV1.5-Proxy there is a README that explains in detail how to install and run the Multiverse client. Here is a snippet of that README which is relevant.
5) Installing and configuring the MV Client (run only on Windows) - Just download and install it from http://www.multiverse.net/consumer/gettingstarted.jsp?cid=1&scid=0. (you must have an user registration at MV) 6) Installing and selecting the assets repository to be used by MV Client - Since we have not integrated our MV World into Multiverse Network, we need to download an asset repository and the MV tools just for setting which assets reporitory MV Client will use. - First, download and install the MV tools from http://www.multiverse.net/developer/downloadtools.jsp (you must have a developer registration at MV). - Follow the instruction at http://update.multiverse.net/wiki/index.php/Platform_Tutorial_Getting_Started#Download_and_designate_asset_repository (you don't need to run World Editor, just check that you can open models from the assets repository in Model Viewer) - Then, you need to copy the whole ${mv-proxy}/client/sampleworld folder to the assets repository with the same name (i.e., .../SampleAssets/sampleworld), which will create some files there and overrite some existing ones as well. 7) Running the MV Client and connecting to MV servers (where PVP is running) - By default, MV Client try to connect to MV network and, then, opens a screen for browsing the available world demos at this network. However, we are going to use a local world (not one at MV network), so, you must configure MV Client (shortcut) to run in this mode, as follows: - Copy the ${mv-proxy}/client/world_settings.xml to the "{install_dir}/Multiverse Client/Worlds" folder. The default configuration is for connecting to a MV server deployed at petaverse.vettalabs.com for demo purposes (note that it may not be up and running anytime though). If you want to connect to other MV server (usually your local MV server), edit this file and replace the value of the hostname attribute to the corresponding IP or name of the machine where MV/PVP is running. - Run one of the scripts in ${mv-proxy}/use**Map.{bat|sh} in order to copy a map to the correct place to let MultiverseProxy ready to run. - For running MV Client connecting to a standalone server (not to the MV network), change the created shortcut of the MultiverseClient.exe (or create another one by copying & paste it) to use the following options instead: --use_default_repository --frames_between_sleeps 2 --world_settings_file <path_to_the_world_settings.xml_file> As an example, the target field should be set like follows: "C:\Program Files\Multiverse Client\bin\MultiverseClient.exe" --use_default_repository --frames_between_sleeps 2 --world_settings_file "C:\Program Files\Multiverse Client\Worlds\world_settings.xml" - Of course, the steps above are needed only once. After that, you may need to change world_settings.xml file for connecting to a MV server (PVP) at a different machine. - Finally, run the MV Client by double clicking its shortcut.
Creating and Customizing cogbuntu
cogbuntu creation process is entirely scripted. The scripts are well as other resource files are maintained in the launchpad branch
lp:cogbuntu
so check it out
bzr branch lp:cogbuntu
All you need to know is in the README and the otherwise in the various scripts (written in bash).
Misc
reported problem starting PetBrain
<AvdP> Could be me, but all I can find is pbTest.csh, not pb.csh. Also the makeDistribution command has an underscore in real life, so I changed it above.
reported problem to build NLGen
<plucas> Hi - I just downloaded cogbuntu and there was a slight issue with building NLGen. [11:27]
<plucas> For the targets parse-corpus-*, the parameter was passed: -Djava.library.path=/usr/lib:/usr/lib/jni:/usr/local/lib\
<AvdP> This is regarding build.xml in the ~/OpenCog/nlgen folder.
<plucas> However, it needed link-grammar-java, the libs for which are in /usr/lib/jni [11:28]
<plucas> Adding /usr/lib/jni to the list of paths for the parse-corpus-syntax and parse-corpus-semantic targets allowed 'ant server' to succeed. [11:29]
<plucas> Oops when I posted the -D line, it already included my change. The original is: -Djava.library.path=/usr/lib:/usr/local/lib [11:36]
Packages to remove
Non installed but possibly wanted packages for cogbuntu
chktex [latex syntax checker]
junit [Java test unit]
a2ps
festival [Speech Synthesis]
mercurial [control revision]
distcc [distributed compiling] ccache
libdb4.7-dev [for HyperTable] libdb4.7++-dev [for HyperTable] liblog4cpp5 [for HyperTable] liblog4cpp5-dev [for HyperTable] libbz2-dev [for HyperTable] libevent-dev [for HyperTable] libgoogle-perftools-dev [for HyperTable] sparsehash [for HyperTable] cronolog [for HyperTable]
And also RealXtend and Nao proxy.
Edit .emacs
add the following
(setq-default indent-tabs-mode nil) ;; use spaces instead of tab (setq-default c-basic-offset 4) ;; set c based language indent to 4 ;; open cxxtest files in C++ mode (setq auto-mode-alist (cons '("\\.cxxtest$" . c++-mode) auto-mode-alist))
Edit .vimrc
add the following
autocmd BufNewFile,BufReadPost * if match(expand("%:p:h"), "/opencog") >= 0 && &filetype == "cpp" | set ts=4 sw=4 tw=80 ff=unix cindent expandtab | endif