From d05ac5a0413f7a35b2e5c6a2d0a88ab0f4a9599f Mon Sep 17 00:00:00 2001 From: cafemoloko Date: Mon, 10 May 2021 11:12:54 +0200 Subject: [PATCH 1/5] installation guide --- docs/source/install.rst | 101 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/docs/source/install.rst b/docs/source/install.rst index ae4bdff4b..30cdfac7f 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -23,6 +23,7 @@ Windows 10 :ref:`Platform dependencies ` `Discord macOS :ref:`Platform dependencies ` `Discord `__ Ubuntu & Jetson/Xavier :ref:`Platform dependencies ` `Discord `__ Raspberry Pi OS :ref:`Platform dependencies ` `Discord `__ +Jestson Nano :ref:`Installation guide ` `Discord `__ ======================== ============================================== ================================================================================ And the following platforms are also supported by a combination of the community and Luxonis. @@ -84,6 +85,106 @@ Raspberry Pi OS sudo curl -fL http://docs.luxonis.com/_static/install_dependencies.sh | bash +Jetson Nano +*********** + +Perform the following steps, after completing a fresh install and setup. On the first log in, **DO NOT** immediately run updates. + +Go to the *Software* (App Store) and delete the apps or software that you probably will not use. Then open a terminal window and run the following commands: + + .. code-block:: bash + + sudo apt update && sudo apt upgrade + sudo reboot now + +* Change the size of your SWAP. These instructions come from the `Getting Started with AI on Jetson Nano `__ from nvidia: + + .. code-block:: bash + + # Disable ZRAM: + sudo systemctl disable nvzramconfig + # Create 4GB swap file + sudo fallocate -l 4G /mnt/4GB.swap + sudo chmod 600 /mnt/4GB.swap + sudo mkswap /mnt/4GB.swap + +If you have an issue with the final command, you can try the following: + + * Run :code:`vi` or :code:`nano` + + .. code-block:: bash + + sudo vi /etc/fstab + + * Add the following at the bottom of that file: + + .. code-block:: bash + + /mnt/4GB.swap swap swap defaults 0 0 + + * Reboot + + .. code-block:: bash + + sudo reboot now + +The next step is to install :code:`pip` and :code:`python3`: + + .. code-block:: bash + + sudo -H apt install -y python3-pip + +After that, install and set up virtual environment: + + .. code-block:: bash + + sudo -H pip3 install virtualenv virtualenvwrapper + +All following lines to the bash script: + + .. code-block:: bash + + sudo vi ~/.bashrc + + # Virtual Env Wrapper Configuration + export WORKON_HOME=$HOME/.virtualenvs + export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 + source /usr/local/bin/virtualenvwrapper.sh + +Save and reload the script by running the command :code:`source ~/.bashrc`. + +* Create a virtual environment (in this example it's called :code:`depthAI` + + .. code-block:: bash + + mkvirtualenv depthAI -p python3 + +If you are not automatically inside the virtual environment, type: :code:`workon depthAI` + +* Install :code:`depthAI` dependencies + + **MAKE SURE YOU ARE IN THE VIRTUAL ENVIRONMENT TO RUN THIS STEP!** + + .. code-block:: bash + + sudo apt install curl + + #Download and install the dependency package + sudowget-qO- http://docs.luxonis.com/_static/install_dependencies.sh | bash + + #Clone github repository + git clone https://github.com/luxonis/depthai-python.git + cd depthai-python + +Last step is to edit :code:`.bashrc` with the line: + + .. code-block:: bash + + echo “export OPENBLAS_CORETYPE=AMRV8” >> ~/.bashrc + +Navigate to the folder with :code:`depthai` examples and run it. + + openSUSE ******** From 3c4887ec6170de73adf98a7881f1f89b00654ed3 Mon Sep 17 00:00:00 2001 From: cafemoloko Date: Mon, 10 May 2021 16:17:45 +0200 Subject: [PATCH 2/5] credits + some styling --- docs/source/install.rst | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 30cdfac7f..4eb1e25a3 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -97,7 +97,7 @@ Go to the *Software* (App Store) and delete the apps or software that you probab sudo apt update && sudo apt upgrade sudo reboot now -* Change the size of your SWAP. These instructions come from the `Getting Started with AI on Jetson Nano `__ from nvidia: +Change the size of your SWAP. These instructions come from the `Getting Started with AI on Jetson Nano `__ from nvidia: .. code-block:: bash @@ -110,22 +110,14 @@ Go to the *Software* (App Store) and delete the apps or software that you probab If you have an issue with the final command, you can try the following: - * Run :code:`vi` or :code:`nano` - .. code-block:: bash sudo vi /etc/fstab - - * Add the following at the bottom of that file: - - .. code-block:: bash + # Add this line at the bottom of the file /mnt/4GB.swap swap swap defaults 0 0 - * Reboot - - .. code-block:: bash - + # Reboot sudo reboot now The next step is to install :code:`pip` and :code:`python3`: @@ -140,7 +132,7 @@ After that, install and set up virtual environment: sudo -H pip3 install virtualenv virtualenvwrapper -All following lines to the bash script: +Add following lines to the bash script: .. code-block:: bash @@ -151,19 +143,14 @@ All following lines to the bash script: export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 source /usr/local/bin/virtualenvwrapper.sh -Save and reload the script by running the command :code:`source ~/.bashrc`. - -* Create a virtual environment (in this example it's called :code:`depthAI` +Save and reload the script by running the command :code:`source ~/.bashrc`. Then create a virtual environment (in this example it's called :code:`depthAI`). .. code-block:: bash mkvirtualenv depthAI -p python3 -If you are not automatically inside the virtual environment, type: :code:`workon depthAI` -* Install :code:`depthAI` dependencies - - **MAKE SURE YOU ARE IN THE VIRTUAL ENVIRONMENT TO RUN THIS STEP!** +**Note!** Before installing :code:`depthai`, make sure you're in the virtual environment. .. code-block:: bash @@ -185,6 +172,8 @@ Last step is to edit :code:`.bashrc` with the line: Navigate to the folder with :code:`depthai` examples and run it. +Solution provided by **iacisme** via our `Discord `__ channel. + openSUSE ******** From 4a63408b026cbc6748c5c789530f56b81c44dc75 Mon Sep 17 00:00:00 2001 From: cafemoloko Date: Tue, 11 May 2021 13:48:10 +0200 Subject: [PATCH 3/5] minor update --- docs/source/install.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 4eb1e25a3..2d9e2dff2 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -23,7 +23,7 @@ Windows 10 :ref:`Platform dependencies ` `Discord macOS :ref:`Platform dependencies ` `Discord `__ Ubuntu & Jetson/Xavier :ref:`Platform dependencies ` `Discord `__ Raspberry Pi OS :ref:`Platform dependencies ` `Discord `__ -Jestson Nano :ref:`Installation guide ` `Discord `__ +Jestson Nano :ref:`Platform dependencies ` `Discord `__ ======================== ============================================== ================================================================================ And the following platforms are also supported by a combination of the community and Luxonis. @@ -88,7 +88,8 @@ Raspberry Pi OS Jetson Nano *********** -Perform the following steps, after completing a fresh install and setup. On the first log in, **DO NOT** immediately run updates. +To install DepthAI on Jetson Nano, perform the following steps, after completing a fresh install and setup. On the first log in, +**do not** immediately run updates. Go to the *Software* (App Store) and delete the apps or software that you probably will not use. Then open a terminal window and run the following commands: From a688c98c19756e1b99470e80b357f0eae5c822a5 Mon Sep 17 00:00:00 2001 From: cafemoloko Date: Fri, 14 May 2021 15:12:00 +0200 Subject: [PATCH 4/5] updates after comments --- docs/source/install.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 2d9e2dff2..729f3dc0f 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -91,7 +91,9 @@ Jetson Nano To install DepthAI on Jetson Nano, perform the following steps, after completing a fresh install and setup. On the first log in, **do not** immediately run updates. -Go to the *Software* (App Store) and delete the apps or software that you probably will not use. Then open a terminal window and run the following commands: +This first step is optional: go to the *Software* (App Store) and delete the apps or software that you probably will not use. + +Open a terminal window and run the following commands: .. code-block:: bash @@ -158,7 +160,7 @@ Save and reload the script by running the command :code:`source ~/.bashrc`. Then sudo apt install curl #Download and install the dependency package - sudowget-qO- http://docs.luxonis.com/_static/install_dependencies.sh | bash + sudo wget-qO- http://docs.luxonis.com/_static/install_dependencies.sh | bash #Clone github repository git clone https://github.com/luxonis/depthai-python.git @@ -168,10 +170,9 @@ Last step is to edit :code:`.bashrc` with the line: .. code-block:: bash - echo “export OPENBLAS_CORETYPE=AMRV8” >> ~/.bashrc - -Navigate to the folder with :code:`depthai` examples and run it. + echo "export OPENBLAS_CORETYPE=AMRV8" >> ~/.bashrc +Navigate to the folder with :code:`depthai` examples folder, run :code:`python install_requirements.py` and then run :code:`python 01_rgb_preview.py`. Solution provided by **iacisme** via our `Discord `__ channel. From 69667ea6ebf371f967aa663c3ee95f1110c52165 Mon Sep 17 00:00:00 2001 From: cafemoloko Date: Sun, 16 May 2021 11:44:16 +0200 Subject: [PATCH 5/5] install curl removed --- docs/source/install.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 729f3dc0f..24942b4eb 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -157,8 +157,6 @@ Save and reload the script by running the command :code:`source ~/.bashrc`. Then .. code-block:: bash - sudo apt install curl - #Download and install the dependency package sudo wget-qO- http://docs.luxonis.com/_static/install_dependencies.sh | bash @@ -172,9 +170,10 @@ Last step is to edit :code:`.bashrc` with the line: echo "export OPENBLAS_CORETYPE=AMRV8" >> ~/.bashrc + Navigate to the folder with :code:`depthai` examples folder, run :code:`python install_requirements.py` and then run :code:`python 01_rgb_preview.py`. -Solution provided by **iacisme** via our `Discord `__ channel. +Solution provided by `iacisme `__ via our `Discord `__ channel. openSUSE ********