numenta / nupic-legacy

Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
http://numenta.org/
GNU Affero General Public License v3.0
6.34k stars 1.56k forks source link

Vagrant instructions are out of date #708

Closed oxtopus closed 8 years ago

oxtopus commented 10 years ago

Following instructions at https://github.com/numenta/nupic/wiki/Running-NuPIC-in-a-Virtual-Machine will no longer yield a workable nupic installation.

Of note:

To be current with nupic status quo, image needs to be updated to include the right version of cmake, python dependencies, and an updated default python 2.7 installation. Instructions need to be revised, too.

$ cmake ..
CMake Error at CMakeLists.txt:186 (cmake_minimum_required):
  CMake 2.8 or higher is required.  You are running version 2.6.4

-- Configuring incomplete, errors occurred!
_default:[vagrant@jblock-grokbox build_system]$ cmake28 ..
-- The CXX compiler identification is GNU 4.4.7
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Error removing directory "/home/vagrant/nta/current".
-- Checking platform...
-- Platform: linux64
-- Platform-specific flags:
--   Libraries: -std=c++11 -lm -lpthread -ldl -lutil
--   Extra MPI libraries: -lrt
--   CXX flags: -fPIC -DPIC -m64
--   AS flags: -msse2
--   Debug flags: -g
--   LD flags: -Wl,--no-as-needed -static-libgcc
--   Python extension link flags: -pthread -shared
--   Python embedding link flags: -Wl,--export-dynamic
-- Checking software tools...
Python 2.6.6
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named numpy
CMake Error at CMakeLists.txt:367 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named numpy
-- Python details:
--   Version: 2.6
--   Include dir: /usr/include/python2.6
--   Library dir: /usr/lib/python2.6
--   Site packages dir: /home/vagrant/nta/current/lib/python2.6/site-packages
-- Numpy details:
--   Version: 
--   Include dir: 
-- Swig details:
--   Version: 1.3.36
-- Checking environment...
-- Environment variables:
--   PATH = /home/vagrant/nta/current/bin
--   PYTHONPATH = /home/vagrant/nta/current/lib/python2.6/site-packages
--   NUPIC = /vagrant/nupic
--   LD_LIBRARY_PATH = /tmp/ntabuild/lib:/home/vagrant/nta/current/lib:
--   DYLD_LIBRARY_PATH = /home/vagrant/nta/current/lib
--   NTA = /home/vagrant/nta/current
--   NTA_ROOTDIR = /home/vagrant/nta/current
--   NTA_DATA_PATH = 
--   NTAX_DEVELOPER_BUILD = 1
-- Checking project...
-- Project: Nupic
-- Locations:
--   Source: /vagrant/nupic
--   Build System: /vagrant/nupic/build_system
--   Build Directory: /tmp/ntabuild
--   Release: /home/vagrant/nta/current
-- Options:
--   Optimization: ON
--   Debug Symbols: ON
--   Assertions: ON
--   Profiling: OFF
--   Python Support: ON
--   MPI Support: ON
-- Linking from '/vagrant/nupic/lang/py/bindings/__init__.py' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/bindings/__init__.py'
-- Linking from '/vagrant/nupic/py/nupic/algorithms' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/algorithms'
-- Linking from '/vagrant/nupic/py/nupic/frameworks' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/frameworks'
-- Linking from '/vagrant/nupic/py/nupic/image' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/image'
-- Linking from '/vagrant/nupic/py/nupic/research' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/research'
-- Linking from '/vagrant/nupic/py/nupic/data' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/data'
-- Linking from '/vagrant/nupic/py/nupic/database' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/database'
-- Linking from '/vagrant/nupic/py/nupic/swarming' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/swarming'
-- Linking from '/vagrant/nupic/py/nupic/encoders' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/encoders'
-- Linking from '/vagrant/nupic/py/nupic/support' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/support'
-- Linking from '/vagrant/nupic/py/regions' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/regions'
-- Linking from '/vagrant/nupic/py/nupic/math/__init__.py' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/math/__init__.py'
-- Linking from '/vagrant/nupic/py/nupic/math/cross.py' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/math/cross.py'
-- Linking from '/vagrant/nupic/py/nupic/math/roc_utils.py' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/math/roc_utils.py'
-- Linking from '/vagrant/nupic/examples/prediction' to '/home/vagrant/nta/current/share/prediction'
-- Linking from '/vagrant/nupic/examples/opf' to '/home/vagrant/nta/current/share/opf'
-- Linking from '/vagrant/nupic/qa/shared_data' to '/home/vagrant/nta/current/share/test/data'
-- Linking from '/vagrant/nupic/tests' to '/home/vagrant/nta/current/tests'
-- Linking from '/vagrant/nupic/run_tests.sh' to '/home/vagrant/nta/current/bin/run_tests.sh'
-- Linking from '/vagrant/nupic/bin/run_tests.py' to '/home/vagrant/nta/current/bin/run_tests.py'
-- Linking from '/vagrant/nupic/bin/run_swarm.py' to '/home/vagrant/nta/current/bin/run_swarm.py'
-- Linking from '/vagrant/nupic/external/licenses' to '/home/vagrant/nta/current/share/doc/licenses'
-- Linking from '/vagrant/nupic/conf/default/nupic-default.xml' to '/home/vagrant/nta/current/conf/default/nupic-default.xml'
-- Linking from '/vagrant/nupic/conf/default/nupic-logging.conf' to '/home/vagrant/nta/current/conf/default/nupic-logging.conf'
-- Linking from '/vagrant/nupic/env.sh' to '/home/vagrant/nta/current/env.sh'
-- Linking from '/vagrant/nupic/lang/py/__init__.py' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/__init__.py'
-- Linking from '/vagrant/nupic/lang/py/engine/__init__.py' to '/home/vagrant/nta/current/lib/python2.6/site-packages/nupic/engine/__init__.py'
-- 
-- Configuring incomplete, errors occurred!```
oxtopus commented 10 years ago

gcc is out of date (at 4.4.7), too. nupic readme says gcc 4.6 or 4.8 (or clang). Ideally, the image would come with a recent install of clang.

breznak commented 10 years ago

readme says gcc 4.6 or 4.8 (or clang).

just a nit, 4.6 - 4.8

oxtopus commented 10 years ago

This more or less captures what I had to do on top of the vagrant image (assuming numenta/nupic#716 is merged)

sudo yum install cmake28.x86_64 clang

echo "# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions

# This is a minimal .bashrc setup for running NuPIC, Hadoop and the Grok engine.
# IMPORTANT: make sure you have .profile and .bash_profile read in your .bashrc

################################################################
#
# Required for basic NuPIC usage
#

export NTA=$HOME/nta/eng
export PATH=.:$NTA/bin:$PATH:/home/vagrant/python/bin:/bin:/usr/bin:/usr/sbin:/sbin:$HOME/bin:$HOME/jython
export LD_LIBRARY_PATH=/home/vagrant/python/lib
export PYTHONPATH=/home/vagrant/python/lib/python2.7/site-packages
export NUPIC=$HOME/nupic
export CC=clang
export CXX=clang++
source $HOME/nupic-linux64/bin/activate > /dev/null
" > ~/.bashrc"

Log out/log in

wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar xzvf Python-2.7.6.tgz 
cd Python-2.7.6
./configure --enable-shared --prefix=/usr/local
make
make altinstall
git clone https://github.com/numenta/nupic.git
git clone https://github.com/numenta/nupic-linux64.git
cd nupic-linux64
git checkout python-2.7-with-pillow
pip install --install-option="--prefix=${NUPIC_ENV}" --ignore-installed --upgrade --build="${NUPIC_ENV}/pip-build" -r ${NUPIC}/external/common/requirements.txt
mkdir cd $NUPIC/build_system
cd $NUPIC/build_system
cmake ..
make -j3 VERBOSE
rhyolight commented 8 years ago

This issue has been closed because it is obsolete because Docker.

Obsolete Walkman