Skip to content

Instantly share code, notes, and snippets.

@jetsonhacks
Last active August 31, 2019 04:42
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save jetsonhacks/ad01566922a5c2648a10 to your computer and use it in GitHub Desktop.
Save jetsonhacks/ad01566922a5c2648a10 to your computer and use it in GitHub Desktop.
Install iTorch and prerequisites
#!/bin/sh
# Install Python prerequisites on NVIDIA Jetson TK1 for iTorch
# This is for https://github.com/facebook/iTorch
# L4T 21.3, Torch 7 (http://torch.ch)
# Python 2.7 or greater must be installed before running this script
# Torch 7 should already be installed before running this script
# iPython is loaded using pip, as repository version is 1.x version, > 2.0 is needed
# Need to compile from source as repository version libzmq3-dev is not the correct revision
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
tar xzvf zeromq-4.0.5.tar.gz
cd zeromq-4.0.5
./configure
make
sudo make install
cd ..
sudo apt-get install python-dev -y
sudo apt-get install python-pip -y
sudo pip install ipython
sudo apt-get install python-zmq -y
sudo apt-get install python-markupsafe -y
sudo apt-get install python-jsonschema -y
sudo pip install jinja2
sudo pip install tornado
sudo luarocks install luacrypto
sudo luarocks install env
sudo luarocks install lzmq
sudo luarocks install lbase64
sudo luarocks install uuid
# add some decoders for iTorch audio and video
sudo apt-get install gstreamer1.0-libav -y
# Install iTorch
git clone https://github.com/facebook/iTorch.git
cd iTorch
sudo env "PATH=$PATH" luarocks make
sudo chown -R $USER $(dirname $(ipython locate profile))
@shravankumar147
Copy link

when I run itorch : I got this following, can you help me fix this
bash: /home/shravan/torch/install/bin/itorch: Permission denied

@harshpanchal-hp
Copy link

change permission to executable or use 'sudo'!

@kaisark
Copy link

kaisark commented Sep 26, 2017

I suggest adding the following package to the install script to avoid the error below:
sudo apt-get install libssl-dev


Installing https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luacrypto-0.3.2-2.src.rock...
Using https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luacrypto-0.3.2-2.src.rock... switching to 'build' mode

Error: Could not find header file for OPENSSL
No file openssl/evp.h in /usr/local/include
No file openssl/evp.h in /usr/include
You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command.
Example: luarocks install luacrypto OPENSSL_DIR=/usr/local

@DevAdityaSinha
Copy link

sudo : luarocks command not found
How do i resolve this .tried changing write permissions, did'nt get any proper solution though.

@moisehannah
Copy link

Hi,

I get this issue when trying to run "sudo env "PATH=$PATH" luarocks make"

Error: Argument missing: please specify a rockspec to use on current directory.

Do you know how i can solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment