These examples can also be run through Jupyter notebook GUI utility. Using the Petalinux project released up till 2021.1, you need to build a project to enable Jupyter with the below mentioned steps. However from 2021.2, these examples are included in the pre-built WIC image. So you can directly use it without building the project:
- To build the example, follow these steps:
- Create PetaLinux project using released 2020.1 zcu106/zcu104 BSPs.
- Configure and build image:
petalinux-config -c rootfs
- Enable the gstreamer-vcu-notebooks option under User Packages and then build the BSP
- To run the example, follow these steps:
- Make sure that the ZCU106/104 board is connected to the Ethernet.
- Boot the board using generated images.
- Login to kernel using username as
rootand password as
- The Jupyter notebook server is executed on the boot. The log file is at location
/var/log/jupyter.log. The URL+ token to connect
to Jupyter notebook is in URL+ token is generated in
>> cat /var/log/jupyter.log netip is net_ip= echo CONNECTING... 0 seconds netip is CONNECTING... 2 seconds netip is CONNECTING... 4 seconds netip is 172.19.0.23 [I 21:11:06.985 NotebookApp] Writing notebook server cookie secret to /.local/share/jupyter/runtime/notebook_cookie_secret [I 21:11:08.292 NotebookApp] Serving notebooks from local directory: /usr/share/example-notebooks [I 21:11:08.293 NotebookApp] The Jupyter Notebook is running at: [I 21:11:08.293 NotebookApp] http://172.19.0.23:8888/?token=f1897000565b0255786124d56318b4852f9062f768a877a7 [I 21:11:08.293 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 21:11:08.318 NotebookApp] To access the notebook, open this file in a browser: file:///.local/share/jupyter/runtime/nbserver-2812-open.html Or copy and paste one of these URLs: http://172.19.0.23:8888/?token=f1897000565b0255786124d56318b4852f9062f768a877a7
- Copy the generated URL to the remote host’s web browser. For example: http://172.19.0.23:8888/
The host PC's browser tab should show the following VCU notebook examples:
- Click restart the kernel and run all.
- Fill the data as per requirement. This is optional. If you do not fill or select data, the example runs with the default values.
- Once the selection of parameters is done, click Start Demo.
- The output of script running on the board will be displayed on the Jupyter
console. For example, Decode→Display Jupyter notebook output is as shown
in the following figure:
- To clear the output log follow these steps:
- Press the stop button, in case Jupyter notebook is still running.
- Click Clear Output.Note: The output is cleared only when the example is stopped in-between or completed.