Skip to content

Commit

Permalink
devcontainer: Swap to TensorRT 8.5.3.1 / CUDA 11.8
Browse files Browse the repository at this point in the history
  • Loading branch information
marcojob committed Nov 7, 2024
1 parent ec8253e commit 078c5d7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ RUN groupadd -r asl && \
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.1-1_all.deb && \
sudo dpkg -i cuda-keyring_1.1-1_all.deb && \
sudo apt update && \
sudo apt -y install cuda-toolkit-11-6 cudnn9-cuda-11
sudo apt -y install cuda-toolkit-11-8 cudnn9-cuda-11

# CUDA: Add PATH and LD_LIBRARY_PATH to .bash_aliases
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-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813_1-1_amd64.deb /tmp/tensorrt.deb
COPY resources/nv-tensorrt-local-repo-ubuntu2004-8.5.3-cuda-11.8_1.0-1_amd64.deb /tmp/tensorrt.deb
RUN sudo dpkg -i /tmp/tensorrt.deb
RUN sudo apt-key add /var/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813/c1c4ee19.pub && sudo apt update
RUN sudo apt install -y tensorrt=8.4.3.1-1+cuda11.6 \
libnvinfer8=8.4.3-1+cuda11.6 \
libnvinfer-plugin8=8.4.3-1+cuda11.6 \
libnvparsers8=8.4.3-1+cuda11.6 \
libnvonnxparsers8=8.4.3-1+cuda11.6 \
libnvinfer-bin=8.4.3-1+cuda11.6 \
libnvinfer-dev=8.4.3-1+cuda11.6 \
libnvinfer-plugin-dev=8.4.3-1+cuda11.6 \
libnvparsers-dev=8.4.3-1+cuda11.6 \
libnvonnxparsers-dev=8.4.3-1+cuda11.6 \
libnvinfer-samples=8.4.3-1+cuda11.6
RUN sudo cp /var/nv-tensorrt-local-repo-ubuntu2004-8.5.3-cuda-11.8/nv-tensorrt-local-3EFA7C6A-keyring.gpg /usr/share/keyrings/
RUN sudo apt update && sudo apt install -y tensorrt=8.5.3.1-1+cuda11.8 \
libnvinfer8=8.5.3-1+cuda11.8 \
libnvinfer-plugin8=8.5.3-1+cuda11.8 \
libnvparsers8=8.5.3-1+cuda11.8 \
libnvonnxparsers8=8.5.3-1+cuda11.8 \
libnvinfer-bin=8.5.3-1+cuda11.8 \
libnvinfer-dev=8.5.3-1+cuda11.8 \
libnvinfer-plugin-dev=8.5.3-1+cuda11.8 \
libnvparsers-dev=8.5.3-1+cuda11.8 \
libnvonnxparsers-dev=8.5.3-1+cuda11.8 \
libnvinfer-samples=8.5.3-1+cuda11.8

# OpenCV Build Stage
FROM base AS opencv_build
Expand Down
4 changes: 2 additions & 2 deletions src/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ void LearningInterface::load_model() {
class Logger : public nvinfer1::ILogger {
public:
void log(Severity severity, const char* msg) noexcept override {
std::cout << msg << std::endl; // Log the message
std::cout << msg << std::endl;
}
} logger; // Create a logger instance
} logger;

_runtime = nvinfer1::createInferRuntime(logger);
if (_runtime != nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion test/test_learning_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class RaftTest : public ::testing::Test {
protected:
// Initialize variables for the test
std::string model_path = "path/to/model.onnx"; // Change to a valid model path
std::string model_path = "../resources/raft_small_iter10_240x320.onnx.plan";
size_t input_height = 224;
size_t input_width = 224;

Expand Down

0 comments on commit 078c5d7

Please sign in to comment.