From 5e7a8e8c1b6a70ed4d10a72e04ed6409bc957e70 Mon Sep 17 00:00:00 2001 From: marcojob <44396071+marcojob@users.noreply.github.com> Date: Mon, 4 Nov 2024 17:35:42 +0100 Subject: [PATCH] devcontainer: Downgrade tensorrt --- .devcontainer/Dockerfile | 10 +++++----- .devcontainer/build_and_push_images.sh | 2 +- src/usb_cam_node.cpp | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3140129a..ba7d683e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -30,9 +30,10 @@ RUN echo 'export PATH=$PATH:/usr/local/cuda/bin' >> /home/asl/.bash_aliases && \ echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64' >> /home/asl/.bash_aliases # TensorRT: Install from .deb file -COPY resources/nv-tensorrt-local-repo-ubuntu2004-10.6.0-cuda-12.6_1.0-1_amd64.deb /tmp/tensorrt.deb -RUN sudo dpkg -i /tmp/tensorrt.deb || sudo apt-get install -f -y -RUN sudo cp /var/nv-tensorrt-local-repo-ubuntu2004-10.6.0-cuda-12.6/*-keyring.gpg /usr/share/keyrings/ && sudo apt update && sudo apt install -y tensorrt +COPY resources/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813_1-1_amd64.deb /tmp/ +RUN sudo dpkg -i /tmp/resources/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813_1-1_amd64.deb || sudo apt-get install -f -y +# RUN sudo cp /var/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813/*-keyring.gpg /usr/share/keyrings/ && sudo apt update && sudo apt install -y tensorrt +RUN sudo apt update && sudo apt install -y tensorrt # OpenCV Build Stage FROM base AS opencv_build @@ -63,5 +64,4 @@ USER root # Clean up RUN rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* /var/cache/apt/archives/* - -ENTRYPOINT ["/bin/bash"] \ No newline at end of file +ENTRYPOINT ["/bin/bash"] diff --git a/.devcontainer/build_and_push_images.sh b/.devcontainer/build_and_push_images.sh index 35ec1b1f..b028eb12 100755 --- a/.devcontainer/build_and_push_images.sh +++ b/.devcontainer/build_and_push_images.sh @@ -1 +1 @@ -docker buildx build -t omavteam/v4l2_camera:latest -f .devcontainer/Dockerfile --push . +docker buildx build --progress=plain --tag omavteam/v4l2_camera:latest -f .devcontainer/Dockerfile --push . diff --git a/src/usb_cam_node.cpp b/src/usb_cam_node.cpp index de1d0761..388fa13b 100644 --- a/src/usb_cam_node.cpp +++ b/src/usb_cam_node.cpp @@ -72,7 +72,7 @@ class UsbCamNode { UsbCamNode() : m_node("~") { // Setup the network that outputs derivates of the image captured - networks.push_back(std::make_unique("resources/raft.onnx", 240, 320)); + // networks.push_back(std::make_unique("resources/raft.onnx", 240, 320)); // Advertise the main image topic image_transport::ImageTransport it(m_node); @@ -177,12 +177,12 @@ class UsbCamNode { m_image_pub.publish(m_image, *ci); // Run all the networks - for (const auto& net : networks) { - net->set_input(m_image.data.data(), 1920, 1200); - if (net->run_inference(1)) { - net->publish(); - } - } + // for (const auto& net : networks) { + // net->set_input(m_image.data.data(), 1920, 1200); + // if (net->run_inference(1)) { + // net->publish(); + // } + // } return true; }