Hood ROS 2 Foxy Docker 20210814

From wikidb
Jump to: navigation, search

Documentation

Docker

  • See July 7, 2021 notes referenced below. I worked on Docker starting in line 1034. I need to investigate what I did, what I have used and what I need to do.

Install

From Alsora ROS 2 instructions

The provided Dockerfile contains an Ubuntu 18.04 environment with all the dependencies and this package already installed.

To use the Dockerfile:

 $ git clone https://github.com/alsora/ros2-tensorflow.git
       ...
       ...

 $ ls ros2-tensorflow
       CONTRIBUTING.md  data  docker  LICENSE  README.md  ros2-tensorflow

 $ cd ros2-tensorflow/docker

 $ sudo bash build.sh
       ...
       ...

 $ sudo bash run.sh
       Sourcing ROS2 packages...
  • Note: The build and run had to run under sudo. Does this point out a problem.
  • Note: I wander what this build was doing.
  • Note: In the Alsora Build section, the ros2-tensorflow directory in linked to ~/tf_ws/src.

Usage

TBD: Move this to the correct Usage section

TERMINAL 1

 $ cd ros2-tensorflow/

 $ cd docker/

 $ sudo bash run.sh
       Sourcing ROS2 packages...

 # ros2 run tf_detection_py server
       2021-08-15 04:00:18.750977: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0';  dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /root/tf_ws/install/tf_interfaces/lib:/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib
       2021-08-15 04:00:18.751020: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
       >> Downloading ssd_mobilenet_v1_coco_2017_11_17 100.0%Succesfully downloaded ssd_mobilenet_v1_coco_2017_11_17 76534733 bytes.
       Trying to extract archive /usr/local/lib/python3.8/dist-packages/tensorflow/models/research/object_detection/ssd_mobilenet_v1_coco_2017_11_17.tar.gz
       2021-08-15 04:01:19.950948: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /root/tf_ws/install/tf_interfaces/lib:/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib
       2021-08-15 04:01:19.950992: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
       2021-08-15 04:01:19.951021: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (hood): /proc/driver/nvidia/version does not exist
       2021-08-15 04:01:19.951324: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
       To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
       2021-08-15 04:01:19.989355: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)
       [INFO] [1629000084.531362850] [detection_server]: Load model completed!
       [INFO] [1629000087.782894835] [detection_server]: Warmup completed! Ready to receive real images!

Check Out

TBD

  • See July 7, 2021 notes referenced below. I worked on Docker starting in line 1034. I need to investigate what I did, what I have used and what I need to do.

Notes and Logs

There is a lot going on in the Docker build and install.