Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to py39 / tf 29 #48

Merged
merged 31 commits into from
Jun 20, 2023
Merged

Upgrade to py39 / tf 29 #48

merged 31 commits into from
Jun 20, 2023

Conversation

DocGarbanzo
Copy link
Contributor

Upgrading Python to 3.9 and Tensorflow to 2.9

This doc update covers the change in Donkey Car when we merge autorope/donkeycar#1119 into main. The PR upgrade will bump the Donkey Car version to 5.0.X. In this PR for the documentation change, there are essentially 3 changes:

  • Upgrading of python to 3.9 (note, only the jetson jetpack 5.0.X install is using python 3.8 which is the system version and therefore Nvidia provides the required tensorflow and Open CV packages). Upgrading tensorflow to 2.9.

  • Upgrading the Raspberry Pi to Raspberry Pi OS Bullseye 64 bit. We are a making use of the new graphical installer for that.

  • Upgrading to Jetpack 4.6.X on Jetson Nano and 5.0.X on Jetson Xavier (and newer Jetson boards, like the Orin)

Also changing the theme from readthedocs to material. Note the doc change here still keeps the old installation instructions if you want to stick to Donkey Car <= 4.5.X

DocGarbanzo and others added 20 commits February 19, 2023 19:52
* better separation between the differen installs
* added flow chart and correspondin pip packages
* therefore also updating GH actions
* fix pip install to be outside yaml and correct open cv cmake command
* fix git lfs install for jetson and keras-vis
Mambaforge install and tf.version calls needed updating
* update latest DC version from 4.4.X to 4.5.X
* Replace mermaid graph w/ table
* Include latest feedback from Tom on Xavier install, for installing mamba and moving to miniconda on jp502.
* Add check of opencv python in jp502
…first only needs kivy-jetson and latter needs kivy.
@DocGarbanzo DocGarbanzo requested review from Ezward and a team April 6, 2023 19:02

```bash
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_PREFIX_PATH=$/home/<user name>/mambaforge/envs/donkey/bin/python3.9 \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can <user name> be replaced with $USER?

Copy link
Contributor Author

@DocGarbanzo DocGarbanzo Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I think the $ is wrong there anyway and we should rather put

-D "${HOME}/mambaforge/envs/donkey/bin/python3.9"

Could you check that? There are 4 more references to mamba forge and opencv, I have replaced all of them.

-D PYTHON3_LIBRARIES_PATH=/home/<user name>/mambaforge/envs/donkey/lib \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D BUILD_EXAMPLES=OFF ..

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ make -j4 is missing here.

I think it would be better to leave out this and the following steps in this code block, and leave only the cmake command which differs from the Qengineering install steps

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @TCIII ran into problems when compiling with -j 4 and even with -j 2 which was also mentioned in the Qengineering instructions. In the end we gave up and run w/o any parallelisation, which was slow but completed. Did -j 4 work for you without problems?

@BrianHenryIE
Copy link

BrianHenryIE commented Apr 10, 2023

Mostly in addition to the comments above, I got Open CV to install on my third try.

  1. I had an existing Donkey install on 4.6.1 which I tried to use as a base. Failed between 30/40%
  2. A fresh install just for this, where I tried to follow the steps of the Q-engineering tutorial but it failed between 30/40% (different error)
  3. Success: I downloaded the Q-engineering install script and edited in the cmake changes in the documentation.

Important to note (1) was its own legacy Donkey install on SD card, and (2) and (3) were the same new install..

@DocGarbanzo
Copy link
Contributor Author

@BrianHenryIE - thank you for all your good comments and the thorough review of the doc update. I have updated the files as mentioned in the comments above. If you could confirm the changes are good and work for you - that would be great.

@francisduvivier
Copy link
Contributor

francisduvivier commented Apr 10, 2023

Hi,
I've been working on this branch with a raspberry pi and working great for me.
Some notes from my side:

  • There is no Camera option in the interface settings in raspi-config, only the legacy camera option and I don't think that one needs to be enabled because it works without for me. So I'd remove the part saying you need to able the camera in raspi-config.

  • Regarding Donkey on Raspberry pi OS Lite, I had to do the following additional steps, might be worth mentioning:

    • sudo apt install pi git -y
    • pip install virutalenv

Additional note, but not sure if anything about this needs to be in the donkey docs:

If you are on a previous version like 4.6.1 you can upgrade with:

```commandline
sudo apt update
Copy link

@BrianHenryIE BrianHenryIE Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just sat 20 minutes waiting for this to finish... It was prompting me to confirm overwriting files (although it was a fresh SD install)

Maybe we should add the -y flag: sudo apt update -y sudo apt upgrade -y.

I haven't tested it yet, particularly the fullscreen dialog: "Configuring docker.io" "Automatically restart Docker daemon?"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-y flag did not work to automatically accept prompts.

~75%

Setting up nvidia-l4t-core (32.7.3-20221122092935) ...

Configuration file '/etc/ld.so.conf.d/nvidia-tegra.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** nvidia-tegra.conf (Y/I/N/O/D/Z) [default=N] ? 

77%

Setting up nvidia-l4t-oem-config (32.7.3-20221122092935) ...

Configuration file '/etc/systemd/nv-oem-config-post.sh'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** nv-oem-config-post.sh (Y/I/N/O/D/Z) [default=N] ? 

81%. This is a fullscreen prompt

 Configuring docker.io 
Automatically restart Docker daemon?      

@DocGarbanzo DocGarbanzo merged commit 237f00f into master Jun 20, 2023
@DocGarbanzo DocGarbanzo deleted the Update_to_tf_29 branch August 10, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants