Skip to content

Instantly share code, notes, and snippets.

@ArashHosseini
Last active April 11, 2022 17:25
Show Gist options
  • Save ArashHosseini/c8259fbfc761096338c30dc41ec823f3 to your computer and use it in GitHub Desktop.
Save ArashHosseini/c8259fbfc761096338c30dc41ec823f3 to your computer and use it in GitHub Desktop.
#upadte and install libs incl. pip
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
sudo apt-get install python3-pip
sudo pip3 install -U pip
#install TF
sudo pip3 install -U numpy grpcio absl-py py-cpuinfo psutil portpicker six mock requests gast h5py astor termcolor protobuf keras-applications keras-preprocessing wrapt google-pasta
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.14.0+nv19.7
#install opencv 4.0.0
#first create swap file else Out of memory during building
#install needs around 6GB on pick
sudo fallocate -l 4096 /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
#Also, to make the swapfile activated during reboot, edit /etc/fstab:
sudo nano /etc/fstab
#And add the following line:
/swapfile none swap 0 0
#nwo you should have 4 gb more which will visible in sysytem Monitor
#https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.0.0_Nano.sh
cd ~
mkdir git
mkdir opencv
git clone https://github.com/AastaNV/JEP.git
cd JEP/script
./install_opencv4.0.0_Nano.sh ~/opencv
#add sym link
sudo ln -s /usr/local/python/cv2/python-3.6/cv2.cpython-36m-aarch64-linux-gnu.so /usr/lib/python3.6/cv2.cpython-36m-aarch64-linux-gnu.so
#install V2 camera
git clone
#install pytorch
#visit https://nvidia.app.box.com/v/torch-1-2-cp36-jetson-jp421
#download wheel > torch-1.2.0a0+8554416-cp36-cp36m-linux_aarch64.whl
#install wheel
pip3 install numpy torch-1.2.0a0+8554416-cp36-cp36m-linux_aarch64.whl
#install jetson inference
# download the repo
git clone https://github.com/dusty-nv/jetson-inference
cd jetson-inference
git submodule update --init
# configure build tree
mkdir build
cd build
cmake ../ # download all models ~2.2GB,
#it also will install pytorch for py3.5 or py2.7
# build and install
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment