Skip to content

Commit

Permalink
devcontainer: Downgrade tensorrt
Browse files Browse the repository at this point in the history
  • Loading branch information
marcojob committed Nov 4, 2024
1 parent fa8d35e commit 5e7a8e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
ENTRYPOINT ["/bin/bash"]
2 changes: 1 addition & 1 deletion .devcontainer/build_and_push_images.sh
Original file line number Diff line number Diff line change
@@ -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 .
14 changes: 7 additions & 7 deletions src/usb_cam_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Raft>("resources/raft.onnx", 240, 320));
// networks.push_back(std::make_unique<Raft>("resources/raft.onnx", 240, 320));

// Advertise the main image topic
image_transport::ImageTransport it(m_node);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 5e7a8e8

Please sign in to comment.