|
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 |
6 | 2 |
|
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 |
12 | 9 |
|
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 |
20 | 15 |
|
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 |
25 | 21 |
|
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 |
31 | 27 |
|
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 |
33 | 31 |
|
34 | | -# if gpu |
35 | | -luarocks install cudnn |
36 | | -luarocks install cunn |
| 32 | + luarocks install cudnn |
| 33 | + luarocks install cunn |
37 | 34 |
|
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 |
47 | 36 |
|
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 |
51 | 38 |
|
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) |
58 | 40 |
|
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 |
62 | 48 |
|
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 |
65 | 50 |
|
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: |
70 | 52 |
|
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 |
74 | 57 |
|
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. |
0 commit comments