Skip to content

Commit 7035da3

Browse files
committed
Installation instructions updated
1 parent 58d9ce6 commit 7035da3

2 files changed

Lines changed: 48 additions & 64 deletions

File tree

INSTALLATION.md

Lines changed: 44 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,58 @@
1-
sudo apt-get install -y git python-pip python-dev
2-
sudo apt-get install -y python-dev
3-
sudo apt-get install -y autoconf automake libtool curl make g++ unzip
4-
sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev
5-
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
1+
## Installation Instructions
62

7-
# install torch
8-
git clone https://github.com/torch/distro.git ~/torch --recursive
9-
cd ~/torch; bash install-deps;
10-
./install.sh
11-
source ~/.bashrc
3+
### Installing the Essential requirements
4+
sudo apt-get install -y git python-pip python-dev
5+
sudo apt-get install -y python-dev
6+
sudo apt-get install -y autoconf automake libtool curl make g++ unzip
7+
sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev
8+
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
129

13-
# install pytorch
14-
mkdir Projects
15-
cd Projects
16-
git clone https://github.com/hughperkins/pytorch.git
17-
cd pytorch
18-
source ~/torch/install/bin/torch-activate
19-
./build.sh
10+
### Install Torch
11+
git clone https://github.com/torch/distro.git ~/torch --recursive
12+
cd ~/torch; bash install-deps;
13+
./install.sh
14+
source ~/.bashrc
2015

21-
sudo apt-get install -y redis-server rabbitmq-server
22-
sudo rabbitmq-plugins enable rabbitmq_management
23-
sudo service rabbitmq-server restart
24-
sudo service redis-server restart
16+
### Install PyTorch(Python Lua Wrapper)
17+
git clone https://github.com/hughperkins/pytorch.git
18+
cd pytorch
19+
source ~/torch/install/bin/torch-activate
20+
./build.sh
2521

26-
# install nginx
27-
sudo apt-get update
28-
sudo apt-get install -y python-software-properties
29-
sudo add-apt-repository ppa:nginx/development
30-
sudo apt-get install -y nginx
22+
### Install RabbitMQ and Redis Server
23+
sudo apt-get install -y redis-server rabbitmq-server
24+
sudo rabbitmq-plugins enable rabbitmq_management
25+
sudo service rabbitmq-server restart
26+
sudo service redis-server restart
3127

32-
luarocks install loadcaffe
28+
### Lua dependencies
29+
luarocks install loadcaffe
30+
The below two dependencies are only required if you are going to use GPU
3331

34-
# if gpu
35-
luarocks install cudnn
36-
luarocks install cunn
32+
luarocks install cudnn
33+
luarocks install cunn
3734

38-
# cuda installation
39-
# link to download cuda https://developer.nvidia.com/cuda-downloads
40-
cd ..
41-
mkdir cuda_installation
42-
cd cuda_installation
43-
export DEBIAN_FRONTEND=noninteractive
44-
sudo apt-get update -q -y
45-
sudo apt-get -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install linux-generic
46-
wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
35+
### Cuda Installation
4736

48-
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
49-
sudo apt-get update -q -y
50-
sudo apt-get install cuda -q -y
37+
Note: CUDA and cuDNN is only required if you are going to use GPU
5138

52-
# install cudnn
53-
export CUDA_HOME=/usr/local/cuda-7.5
54-
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
55-
56-
PATH=${CUDA_HOME}/bin:${PATH}
57-
export PATH
39+
Download and install CUDA and cuDNN from [nvidia website](https://developer.nvidia.com/cuda-downloads)
5840

59-
sudo add-apt-repository ppa:graphics-drivers/ppa
60-
sudo apt-get update
61-
sudo apt-get install nvidia-370
41+
### Install dependencies
42+
git clone https://github.com/Cloud-CV/Grad-CAM.git
43+
cd Grad-CAM
44+
git submodule init && git submodule update
45+
sh models/download_models.sh
46+
pip install -r requirements.txt
47+
python -m nltk.downloader all
6248

63-
#install cudnn from nvidia site and then run the following command
64-
export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
49+
### Running the RabbitMQ workers and Development Server
6550

66-
#install dependencies
67-
cd ..
68-
git clone https://github.com/Cloud-CV/Grad-CAM.git
69-
cd Grad-CAM
51+
Open 4 different terminal sessions and run the following commands:
7052

71-
git submodule init && git submodule update
72-
sh models/download_models.sh
73-
pip install -r requirements.txt
53+
python worker_vqa.py
54+
python worker_classify.py
55+
python worker_captioning.py
56+
python manage.py runserver
7457

75-
python -m nltk.downloader all
76-
77-
python manage.py collectstatic
58+
You are all set now. Visit http://127.0.0.1:8000 and you will have your demo running successfully.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,24 @@ Grad-CAM uses the class-specific gradient information flowing into the final con
77

88
VQA Demo: http://gradcam.cloudcv.org/vqa
99

10+
1011
![Imgur](http://i.imgur.com/6jB4lAq.gif)
1112

1213
Classification Demo: http://gradcam.cloudcv.org/vqa
1314

15+
1416
![Imgur](http://i.imgur.com/a1IiQg4.gif)
1517

1618
Captioning Demo: http://gradcam.cloudcv.org/captioning
1719

20+
1821
![Imgur](http://i.imgur.com/BsOOpIn.gif)
1922

2023
## Installing / Getting started
2124

2225
We use RabbitMQ to queue the submitted jobs. Also, we use Redis as backend for realtime communication using websockets.
2326

24-
All the instructions for setting Grad-CAM from scratch can be found [here](http://github.com/Cloud-CV/Grad-CAM/installation.md)
27+
All the instructions for setting Grad-CAM from scratch can be found [here](https://github.com/Cloud-CV/Grad-CAM/blob/master/INSTALLATION.md)
2528

2629
Note: For best results, its recommended to run the Grad-CAM demo on GPU enabled machines.
2730

0 commit comments

Comments
 (0)