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.33k stars 1.56k forks source link

Install NuPIC using Docker #3373

Closed masajirv closed 7 years ago

masajirv commented 7 years ago

Hi. I'm trying to run NuPIC with docker refer to https://github.com/numenta/nupic/wiki/Install-NuPIC-using-Docker.

I pulled the NuPIC Docker image and ran the Python unit tests.

docker` run numenta/nupic /usr/local/src/nupic/scripts/run_nupic_tests.py -u --coverage

the result is

============== 2 failed, 903 passed, 26 skipped in 74.74 seconds ===============

Is this expected or should all tests pass ?

and I ran the Python HTM Network API tests and this result is

$ docker run -i -t numenta/nupic /bin/bash -c "python /usr/local/src/nupic/examples/opf/clients/hotgym/simple/hotgym.py"
/usr/include/c++/4.8/debug/vector:346:error: attempt to subscript container
    with out-of-bounds index 29, but container only holds 29 elements.

Objects involved in the operation:
sequence "this" @ 0x0x2d55770 {
  type = NSt7__debug6vectorIN5nupic10algorithms6Cells49InSynapseESaIS4_EEE;
}

sorry for my poor english. Please give me some advice on what I should do about that.

rhyolight commented 7 years ago

This seems familiar... any thoughts @oxtopus or @allanino?

allanino commented 7 years ago

I haven't seen this error before, but I was able to reproduce it. In fact, I'm getting segmentation fault when running NuPIC tests inside the container. Here is the test output with the exact point of failure (the container exits instantly):

$ docker run -i -t --workdir="/usr/local/src/nupic/" numenta/nupic /bin/bash -c "py.test tests/unit"
========================================================================================================= test session starts =========================================================================================================
platform linux2 -- Python 2.7.6 -- pytest-2.5.1
plugins: xdist, cov
collected 926 items / 5 skipped 

tests/unit/nupic/utils_test.py ......
tests/unit/nupic/algorithms/anomaly_likelihood_jeff_test.py ...ss..
tests/unit/nupic/algorithms/anomaly_likelihood_test.py ....................
tests/unit/nupic/algorithms/anomaly_test.py ..............
tests/unit/nupic/algorithms/cells4_test.py .
tests/unit/nupic/algorithms/cla_classifier_diff_test.py ...................
tests/unit/nupic/algorithms/cla_classifier_test.py ...................
tests/unit/nupic/algorithms/fast_cla_classifier_test.py ...................
tests/unit/nupic/algorithms/knn_classifier_test.py .........s..
tests/unit/nupic/algorithms/sdr_classifier_test.py .........................
tests/unit/nupic/algorithms/sp_overlap_test.py .s.s
tests/unit/nupic/algorithms/svm_test.py ..s
tests/unit/nupic/algorithms/tp10x2_test.py .
tests/unit/nupic/data/aggregator_test.py .
tests/unit/nupic/data/dictutils_test.py ......
tests/unit/nupic/data/fieldmeta_test.py .....
tests/unit/nupic/data/file_record_stream_test.py ......
tests/unit/nupic/data/filters_test.py s
tests/unit/nupic/data/functionsource_test.py ......
tests/unit/nupic/data/inference_shifter_test.py ........
tests/unit/nupic/data/record_stream_test.py .......
tests/unit/nupic/data/utils_test.py .......
tests/unit/nupic/data/generators/anomalyzer_test.py ...........
tests/unit/nupic/data/generators/pattern_machine_test.py .........
tests/unit/nupic/data/generators/sequence_machine_test.py .....
tests/unit/nupic/encoders/adaptivescalar_test.py .......
tests/unit/nupic/encoders/category_test.py ..
tests/unit/nupic/encoders/coordinate_test.py .................
tests/unit/nupic/encoders/date_test.py ........
tests/unit/nupic/encoders/delta_test.py .....
tests/unit/nupic/encoders/geospatial_coordinate_test.py ...........
tests/unit/nupic/encoders/logenc_test.py ......
tests/unit/nupic/encoders/multi_test.py ..
tests/unit/nupic/encoders/pass_through_encoder_test.py ....
tests/unit/nupic/encoders/random_distributed_scalar_test.py ...............
tests/unit/nupic/encoders/scalar_test.py .............
tests/unit/nupic/encoders/scalarspace_test.py .
tests/unit/nupic/encoders/sdrcategory_test.py ...
tests/unit/nupic/encoders/sparse_pass_through_encoder_test.py ....
tests/unit/nupic/engine/network_test.py ..........
tests/unit/nupic/engine/syntactic_sugar_test.py .....
tests/unit/nupic/engine/unified_py_parameter_test.py ..
tests/unit/nupic/frameworks/opf/clamodel_classifier_helper_test.py ......................
tests/unit/nupic/frameworks/opf/clamodel_test.py ......
tests/unit/nupic/frameworks/opf/opf_metrics_test.py ...............................
tests/unit/nupic/frameworks/opf/previous_value_model_test.py ......
tests/unit/nupic/frameworks/opf/safe_interpreter_test.py ........
tests/unit/nupic/frameworks/opf/two_gram_model_test.py .....
tests/unit/nupic/frameworks/opf/common_models/cluster_params_test.py .
tests/unit/nupic/math/array_algorithms_test.py ...
tests/unit/nupic/math/cast_mode_test.py s
tests/unit/nupic/math/lgamma_test.py .
tests/unit/nupic/math/nupic_random_test.py .............
tests/unit/nupic/math/sparse_binary_matrix_test.py .....................................s............
tests/unit/nupic/math/sparse_matrix_test.py ...s.........................................................................................
tests/unit/nupic/math/topology_test.py ....................
tests/unit/nupic/regions/anomaly_likelihood_region_test.py ...
tests/unit/nupic/regions/anomaly_region_test.py .
tests/unit/nupic/regions/knn_anomaly_classifier_region_test.py ....................
tests/unit/nupic/regions/record_sensor_region_test.py .
tests/unit/nupic/regions/regions_spec_test.py s...s......
tests/unit/nupic/research/connections_test.py ..............
tests/unit/nupic/research/inhibition_object_test.py s
tests/unit/nupic/research/sp_learn_inference_test.py s
tests/unit/nupic/research/spatial_pooler_boost_test.py ..
tests/unit/nupic/research/spatial_pooler_compatability_test.py ....ss...
tests/unit/nupic/research/spatial_pooler_compute_test.py ..
tests/unit/nupic/research/spatial_pooler_cpp_api_test.py ..............................
tests/unit/nupic/research/spatial_pooler_cpp_unit_test.py ....
tests/unit/nupic/research/spatial_pooler_py_api_test.py ..............................
tests/unit/nupic/research/spatial_pooler_unit_test.py s...................................
tests/unit/nupic/research/temporal_memory_test.py .............................s.....s.
tests/unit/nupic/research/tp10x2_test.py ..

Given that, I'm afraid this issue is beyond my understanding.

jamesweakley commented 7 years ago

I couldn't reproduce this issue. Since this commit the original command requires 'python' in front of it, but apart from that I get 746 tests passed, 22 skipped.

This is on a fresh install of Ubuntu 16.04.2 LTS

rhyolight commented 7 years ago

Thanks @jamesweakley for the report. I'll close for now since we haven't heard back from @masajirv.