Skip to content

Commit c747e14

Browse files
committed
fix onnxruntime
1 parent 1bc43a4 commit c747e14

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

yolox_ros_cpp/docker/onnxruntime/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ services:
1717

1818
environment:
1919
- DISPLAY=$DISPLAY
20+
- NVIDIA_DISABLE_REQUIRE=1
2021
volumes:
2122
- $HOME/ros2_ws:/root/ros2_ws
2223
- /tmp/.X11-unix:/tmp/.X11-unix

yolox_ros_cpp/docker/onnxruntime/dockerfile

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,33 @@ RUN apt update && apt install -y locales git cmake wget curl gnupg2 lsb-release
1414
rm -rf /var/lib/apt/lists/*
1515
ENV LANG=en_US.UTF-8
1616

17-
WORKDIR /workdir
18-
# RUN git clone --depth 1 --recursive https://github.com/microsoft/onnxruntime -b v1.12.1 && \
19-
# cd onnxruntime && \
20-
# ./build.sh --cudnn_home /usr/lib/x86_64-linux-gnu/ \
21-
# --cuda_home /usr/local/cuda \
22-
# --use_cuda \
23-
# --config RelWithDebInfo \
24-
# --build_shared_lib \
25-
# --skip_tests && \
26-
# cd build/Linux/RelWithDebInfo && \
27-
# make install && \
28-
# rm -r /workdir/onnxruntime
17+
RUN git clone --depth 1 --recursive https://github.com/microsoft/onnxruntime -b v1.19.2 && \
18+
cd onnxruntime && \
19+
./build.sh --cudnn_home /usr/lib/x86_64-linux-gnu/ \
20+
--cuda_home /usr/local/cuda \
21+
--use_cuda \
22+
--config RelWithDebInfo \
23+
--build_shared_lib \
24+
--allow_running_as_root \
25+
--skip_tests && \
26+
cd build/Linux/RelWithDebInfo && \
27+
make install
2928

30-
# RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
31-
# echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
32-
# sed -i -e 's/ubuntu .* main/ubuntu noble main/g' /etc/apt/sources.list.d/ros2.list && \
33-
# apt update && \
34-
# apt install -y ros-dev-tools \
35-
# ros-jazzy-cv-bridge \
36-
# ros-jazzy-generate-parameter-library \
37-
# ros-jazzy-parameter-traits \
38-
# ros-jazzy-ros-base \
39-
# ros-jazzy-rqt-image-view \
40-
# ros-jazzy-usb-cam \
41-
# ros-jazzy-vision-msgs && \
42-
# apt -y clean && \
43-
# rm -rf /var/lib/apt/lists/*
29+
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
30+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
31+
sed -i -e 's/ubuntu .* main/ubuntu noble main/g' /etc/apt/sources.list.d/ros2.list && \
32+
apt update && \
33+
apt install -y ros-dev-tools \
34+
ros-jazzy-cv-bridge \
35+
ros-jazzy-generate-parameter-library \
36+
ros-jazzy-parameter-traits \
37+
ros-jazzy-ros-base \
38+
ros-jazzy-rqt-image-view \
39+
ros-jazzy-usb-cam \
40+
ros-jazzy-vision-msgs && \
41+
apt -y clean && \
42+
rm -rf /var/lib/apt/lists/*
4443

45-
# WORKDIR /workspace
46-
# COPY ./ros_entrypoint.sh /ros_entrypoint.sh
47-
# RUN echo "source /ros_entrypoint.sh" >> /root/.bashrc
44+
WORKDIR /workspace
45+
COPY ./ros_entrypoint.sh /ros_entrypoint.sh
46+
RUN echo "source /ros_entrypoint.sh" >> /root/.bashrc

0 commit comments

Comments
 (0)