Installation NuPIC without internet access

installation

#1

Hello all,

I want to install NuPIC on a server which does not have internet access.
I can download all the packages from another machine and transfer all the packages/files to that server via LAN.

Anyone has any clue on how to do this?

Many thanks in advance.


#2

Here’s one way you can do it via pyenv (this assumes you’re running a linux distribution):

  1. Install pyenv and follow the instructions on a machine with internet access: https://github.com/pyenv/pyenv-installer:
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils
  1. Install the version of python you want with:
env PYTHON_CONFIGURE_OPTS="--enable-shared" MAKEOPTS="-j 8" pyenv install 2.7.15`
  1. Activate your new python pyenv local 2.7.15
  2. Install nupic: pip install nupic
  3. Copy ~/.pyenv to the 2nd machine
  4. On your second machine make sure you enable pyenv putting these lines in your ~/.bashrc (or equivalent):
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
  1. Now when you need to use nupic, you can set pyenv local 2.7.15 in the directory, or

#3

Hello Jonathan,

Many thanks for your reply. I will have a try and let you know.

Just one more question regarding to using pyenv solution, the OS of two machines must be the same? Or they can be different as well?

For example, the server is running on SUSE, and the second computer can be running on Ubuntu, Mac OS or Windows? Or it must be running on SUSE as well?

Thank you.


#4

Another option if your second computer is running the Docker daemon, would be to run NuPIC in a container. Of course if Docker is not already running on the second computer, you’d have to install it without internet access (which is probably not any easier than installing NuPIC without internet…)

Anyway, the basic idea would be – On a Linux computer with internet access, first download the NuPIC docker image:

docker pull numenta/nupic

Then save the image to a file:

docker save -o nupic_image.docker numenta/nupic

Then transfer the nupic_image.docker file over to the second computer, and load it:

docker load nupic_image.docker

NuPIC will then be available to run from the image. Basically just plug the docker run command and flags before the command you want to execute in the container, such as:

docker run -it --rm numenta/nupic [command]

Another option might be building NuPIC from source. However, that could be a bit tedious to get any missing dependencies on there though (Building NuPIC.Core, NuPIC, and dependencies requires libtool, autoconf, cmake, cython, setuptools, wheel, numpy, capnproto, and pycapnp for example, and some of those have specific version requirements). I have some experience with installing NuPIC on the Raspberry PI, so might be able to help if you decide to go that route (and there are others who have installed from source on the specific OS you want to run on).


#5

They must be the same, pyenv doesn’t work on windows, but a pyenv built with linux will not run on mac os. If you build it with linux, it should run on any other version of linux as long as they have the same locations for libraries and things. To be on the safe side, you can always make a virtual machine with the same OS as your target and follow the steps on there so that it doesn’t matter what your internet connected machine has.