Last active
September 30, 2023 14:56
-
-
Save zenna/6fc5251265302811e8b3389b98a1d57c to your computer and use it in GitHub Desktop.
Build sequence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Utils | |
```jsx | |
sudo apt-get install -y curl clang locate libdrm-dev silversearcher-ag htop | |
``` | |
**CUDA** | |
cuda 11.8 | |
```jsx | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin | |
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb | |
sudo cp /var/cuda-repo-ubuntu2204-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ | |
sudo apt-get update | |
sudo apt-get -y install cuda | |
``` | |
cudnn | |
```jsx | |
cd PATH/TO/DOWLOADED/CUDNN | |
sudo dpkg -i cudnn-local-repo-ubuntu2204-8.9.1.23_1.0-1_amd64.deb | |
sudo cp /var/cudnn-local-repo-ubuntu2204-8.9.1.23/cudnn-local-1E24EB2B-keyring.gpg /usr/share/keyrings/ | |
sudo apt-get update | |
sudo apt-get install libcudnn8=8.9.1.23-1+cuda11.8 | |
sudo apt-get install libcudnn8-dev=8.9.1.23-1+cuda11.8 | |
sudo apt-get install libcudnn8-samples=8.9.1.23-1+cuda11.8 | |
``` | |
add envs | |
**SSH Keys Github** | |
```jsx | |
ssh-keygen -t ed25519 -C "myemail@go.com@ | |
``` | |
Github: [https://github.com/settings/keys](https://github.com/settings/keys) | |
**SSH Server** | |
```jsx | |
sudo apt install -y openssh-server | |
sudo systemctl start ssh | |
``` | |
PATHS | |
```jsx | |
export PATH=${PATH}:/usr/local/cuda-11.8/bin | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda-11.8/lib64 | |
``` | |
Pylon | |
Download from website, extract then | |
```jsx | |
wget https://www.baslerweb.com/fp-1682511100/media/downloads/software/pylon_software/pylon_7.3.0.27189_linux-x86_64_debs.tar.gz | |
tar -xvf pylon_7.3.0.27189_linux-x86_64_debs.tar.gz | |
sudo apt-get install -y ./pylon_*.deb ./codemeter*.deb | |
``` | |
Bazel | |
``` | |
mkdir ~/bin | |
cd ~/Download | |
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64 | |
chmod +x bazelisk-linux-amd64 | |
cd ~/bin | |
ln -s ~/Downloads/bazelisk-linux-amd64 bazel | |
bazel | |
``` | |
cd | |
mkdir repos | |
cd repos | |
git clone git@github.com:tensorflow/tensorflow.git tensorflow_src | |
cd tensorflow_src | |
git checkout r2.13 | |
mkdir external | |
cd external | |
cmake ../tensorflow/lite | |
cd .. | |
./congfigure | |
bazel build -s -c opt //tensorflow/lite:libtensorflowlite.so | |
``` | |
Might need to install python-is-python3 | |
Hints | |
A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau | |
from loading. This can be reverted by deleting the following file: | |
/etc/modprobe.d/nvidia-graphics-drivers.conf | |
A new initrd image has also been created. To revert, please regenerate your | |
initrd by running the following command after deleting the modprobe.d file: | |
`/usr/sbin/initramfs -u` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have to set max threads or performance will be terrible:
export FORCE_TFLITE_NUM_THREADS=4