Running Examples with Jupyter Notebook - 2023.1 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2023-05-16
Version
2023.1 English

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:

  1. To build the example, follow these steps:
    1. Create PetaLinux project using released 2020.1 zcu106/zcu104 BSPs.
    2. Configure and build image:
      petalinux-config -c rootfs
    3. Enable the gstreamer-vcu-notebooks option under User Packages and then build the BSP
      >> petalinux-build
  2. To run the example, follow these steps:
    1. Make sure that the ZCU106/104 board is connected to the Ethernet.
    2. Boot the board using generated images.
    3. Login to kernel using username as root and password as root.
    4. 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 /.local/share/jupyter/runtime/nbserver-${PID}-open.html.
      >> 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
    5. Copy the generated URL to the remote host’s web browser. For example: http://172.19.0.23:8888/ ?token=f1897000565b0255786124d56318b4852f9062f768a877a7

      The host PC's browser tab should show the following VCU notebook examples:





    6. Click restart the kernel and run all.
    7. Fill the data as per requirement. This is optional. If you do not fill or select data, the example runs with the default values.
    8. Once the selection of parameters is done, click Start Demo.
    9. 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:

  3. To clear the output log follow these steps:
    1. Press the stop button, in case Jupyter notebook is still running.
    2. Click Clear Output.
      Note: The output is cleared only when the example is stopped in-between or completed.