-
Notifications
You must be signed in to change notification settings - Fork 6
/
install_requirements.sh
79 lines (54 loc) · 2.6 KB
/
install_requirements.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
echo "Installing necessary packages and libraries (don't quite know the difference though)."
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install git
sudo pip3 install pyserial pillow numpy matplotlib
echo "Installing stuff that's required for pygame."
sudo apt-get install libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
sudo apt-get install libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install libportmidi-dev
sudo pip3 install pygame
echo "Setting root permissions to the plugged in Arduino Uno on the USB UART."
sudo usermod -a -G dialout $USER
echo "Installing Tensorflow."
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
sudo pip3 install -U pip testresources setuptools
sudo pip3 install -U numpy==1.16.1 future==0.17.1 mock==3.0.5 h5py==2.9.0 keras_preprocessing==1.0.5 keras_applications==1.0.8 gast==0.2.2 enum34 futures protobuf
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow-gpu
echo "Installing PyTorch."
wget https://drive.google.com/file/d/1Eq641Jqb2Q0KBKsVpAhU-vxB_Mqcfrjd/view
sudo pip3 install torch-1.0.0a0+18eef1d-cp36-cp36m-linux_aarch64.whl
sudo pip3 install torchvision
sudo python3 -m pip install git+https://github.com/ipython/traitlets@master
echo "Installing Jupyter Lab."
sudo apt install nodejs npm
sudo pip3 install jupyter jupyterlab
sudo jupyter labextension install @jupyter-widgets/jupyterlab-manager
sudo jupyter labextension install @jupyterlab/statusbar
jupyter lab --generate-config
echo "You will be prompted to enter a password for the Jupyter Lab, maybe go for jetson/jetson2 (unless you want to use a custom password)."
jupyter notebook password
sudo pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
echo "Cloning a Jetbot repo to use something inside the utils folder of it."
sudo apt install python3-smbus
git clone https://github.com/NVIDIA-AI-IOT/jetbot
cd jetbot
sudo apt-get install cmake
cd jetbot/utils
python3 create_jupyter_service.py
sudo mv jetbot_jupyter.service /etc/systemd/system/jetbot_jupyter.service
sudo systemctl enable jetbot_jupyter
sudo systemctl start jetbot_jupyter
cd ~
echo "Making a 6GB swapfile and mounting it on boot."
sudo fallocate -l 6G /var/swapfile
sudo chmod 600 /var/swapfile
sudo mkswap /var/swapfile
sudo swapon /var/swapfile
sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab'
echo "Installing the PlayStation Dual Shock Controller Driver"
sudo pip3 install ds4drv
echo "Done!"