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

NuPIC downloads and uses nupic.core binary during installation if necessary #1421

Closed rhyolight closed 9 years ago

rhyolight commented 9 years ago

Depends on https://github.com/numenta/nupic.core/issues/202. Once binaries are being archived, we could update the nupic installation process to fetch the appropriate binary for local installation.

If nupic.core is not already available on the system PATH, it needs to be downloaded and installed. The expected SHA or version should be used to conjure the path to the library. It should be installed and put into place on the system PATH before moving on to further build steps.

For developers, there also needs to be a way to specify NOT to download the binary, and instead to build from a custom location where the nupic.core checkout exists.

determine nupic.core include/lib path and nupic install path (default to standard locations, overridable by user)

get SHA or version of expected nupic.core (could be NULL for "take anything” or “HEAD")

if nupic.core NOT in include/lib path:
  if archive available for SHA or version and this platform:
    download archive
  else:
    git clone nupic.core at specified SHA or version tag
    build nupic.core from source
  install nupic.core library in specified install path

validate expected nupic.core SHA/version through API
if not valid throw build error
build nupic in build/ directory
install into nupic install path
oxtopus commented 9 years ago

Replace git commands in https://github.com/numenta/nupic/blob/master/CMakeLists.txt#L176...L204 with cmake file(DOWNLOAD ...) equivalent once tarballs are published to S3.

rhyolight commented 9 years ago

@oxtopus Question about https://github.com/numenta/nupic/wiki/NuPIC's-Dependency-on-nupic.core... It says to build and install nupic.core manually to build NuPIC with this command:

python setup.py develop --cmake_options="-DNUPIC_CORE=<path to nupic.core described above>/build/release -DNUPIC_CORE_SOURCE=<path to nupic.core described above>"

Why are both NUPIC_CORE and NUPIC_CORE_SOURCE specified? If the binaries are available, what does the build need the source location for? Or is is supposed to be one or the other?

oxtopus commented 9 years ago

-DNUPIC_CORE_SOURCE is no longer required. Doc is out of date.

rhyolight commented 9 years ago

Great. I'll update it.

oxtopus commented 9 years ago

No need. I just did, but please review the changes.

rhyolight commented 9 years ago

You beat me to it!