make a directory called /tf_files/opencv_install. Then change the directory to that.
Create the below bash shell script. Then execute the script.
#install_opencv_mine.sh
=========================
git clone https://github.com/Itseez/opencv.git
git clone https://github.com/Itseez/opencv_contrib.git
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j7 # runs 7 jobs in parallel
make install
After this install the python opencv bindings
apt-get install -y python-opencv
security group example (at least these ports should be opened up): launch-wizard-3
===================================================================================
Custom TCP Rule
TCP
8888
0.0.0.0/0
Custom TCP Rule
TCP
8888
::/0
Custom TCP Rule
TCP
6006
0.0.0.0/0
Custom TCP Rule
TCP
6006
::/0
SSH
TCP
22
0.0.0.0/0
HTTPS
TCP
443
0.0.0.0/0
HTTPS
TCP
443
::/0
sudo su
cd /home/ubuntu/workdir/tensorflow/tensorflow/tools/docker
docker images -a
docker ps -a # will show that the previous docker process has exited. Copy the container id from here
# NOW JUST START THE DOCKER CONTAINER AND THEN START jupyter
docker start <CONTAINER ID> # for example: f5e826b541b4
docker attach <CONTAINER ID> # for example: f5e826b541b4
cd /
nohup ./run_jupyter.sh --allow-root > tf_files/nohup.out 2>&1 < /dev/null &
docker exec -it f5e8 bash
This will open another bash shell in the same container
# To start jupyter inside docker from an xterm (say own Mac) and then
# silently exiting without breaking docker
> cd /
> nohup ./run_jupyter.sh --allow-root > tf_files/nohup.out 2>&1 < /dev/null &
> CTRL P Q