-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathDockerfile
90 lines (77 loc) · 3.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2017, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# ----------------------------------------------------------------------
FROM ubuntu:16.04
ENV HOME=/root
ENV PATH=$HOME/.local/bin:$PATH
ENV PYTHONPATH=$HOME/.local/lib/python2.7/site-packages
RUN echo $PYTHONPATH
RUN apt-get update
RUN apt-get install -y build-essential python python-dev cmake python-pip git-core pkg-config libfreetype6-dev libpng-dev zlib1g-dev curl
RUN pip install --user -U setuptools
RUN pip install --user -U pip
RUN pip install --user -U wheel
RUN mkdir $HOME/nta
WORKDIR $HOME/nta
# Clone relevant repos
RUN git clone https://github.com/numenta/nupic.core
RUN git clone https://github.com/numenta/htmresearch-core
RUN git clone https://github.com/numenta/nupic
RUN git clone https://github.com/numenta/htmresearch
RUN git clone https://github.com/numenta/nupic.vision
# Build & install nupic.bindings
WORKDIR $HOME/nta/nupic.core
RUN pip install --user -r bindings/py/requirements.txt
RUN mkdir -p build/scripts
WORKDIR $HOME/nta/htmresearch-core/build/scripts
RUN cmake ../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release -DNUPIC_IWYU=OFF -DPY_EXTENSIONS_DIR=../../bindings/py/src/nupic/bindings
RUN make -j4 && make install
WORKDIR $HOME/nta/nupic.core
RUN pip install --user -e .
# Build & install htmresearch-core
WORKDIR $HOME/nta/htmresearch-core
RUN pip install --user -r bindings/py/requirements.txt
RUN mkdir -p build/scripts
WORKDIR $HOME/nta/htmresearch-core/build/scripts
RUN cmake ../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release -DNUPIC_IWYU=OFF -DPY_EXTENSIONS_DIR=../../bindings/py/src/htmresearch_core
RUN make -j4 && make install
WORKDIR $HOME/nta/htmresearch-core
RUN pip install --user -e .
# Install nupic
WORKDIR $HOME/nta/nupic
RUN pip install --user -e .
# Install htmresearch
WORKDIR $HOME/nta/htmresearch
RUN pip install --user -e .
# Install nupic.vision
WORKDIR $HOME/nta/nupic.vision
RUN pip install --user -e .
# Set up MNIST data
WORKDIR $HOME/nta/nupic.vision/src/nupic/vision/mnist
RUN /bin/bash extract_mnist.sh
RUN mkdir mnist
RUN mv mnist_extraction_source/training mnist/
RUN mv mnist_extraction_source/testing mnist/
RUN python ./convertImages.py mnist
RUN /bin/bash create_training_sample.sh
# Run the experiment
WORKDIR $HOME/nta/nupic.vision/src/nupic/vision/mnist
RUN ls -l
RUN python saccades_experiment.py