Skip to content

Commit

Permalink
fix onnxruntime
Browse files Browse the repository at this point in the history
  • Loading branch information
Ar-Ray-code committed Sep 23, 2024
1 parent 1bc43a4 commit c747e14
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
1 change: 1 addition & 0 deletions yolox_ros_cpp/docker/onnxruntime/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:

environment:
- DISPLAY=$DISPLAY
- NVIDIA_DISABLE_REQUIRE=1
volumes:
- $HOME/ros2_ws:/root/ros2_ws
- /tmp/.X11-unix:/tmp/.X11-unix
Expand Down
57 changes: 28 additions & 29 deletions yolox_ros_cpp/docker/onnxruntime/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,33 @@ RUN apt update && apt install -y locales git cmake wget curl gnupg2 lsb-release
rm -rf /var/lib/apt/lists/*
ENV LANG=en_US.UTF-8

WORKDIR /workdir
# RUN git clone --depth 1 --recursive https://github.com/microsoft/onnxruntime -b v1.12.1 && \
# cd onnxruntime && \
# ./build.sh --cudnn_home /usr/lib/x86_64-linux-gnu/ \
# --cuda_home /usr/local/cuda \
# --use_cuda \
# --config RelWithDebInfo \
# --build_shared_lib \
# --skip_tests && \
# cd build/Linux/RelWithDebInfo && \
# make install && \
# rm -r /workdir/onnxruntime
RUN git clone --depth 1 --recursive https://github.com/microsoft/onnxruntime -b v1.19.2 && \
cd onnxruntime && \
./build.sh --cudnn_home /usr/lib/x86_64-linux-gnu/ \
--cuda_home /usr/local/cuda \
--use_cuda \
--config RelWithDebInfo \
--build_shared_lib \
--allow_running_as_root \
--skip_tests && \
cd build/Linux/RelWithDebInfo && \
make install

# RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
# 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 && \
# sed -i -e 's/ubuntu .* main/ubuntu noble main/g' /etc/apt/sources.list.d/ros2.list && \
# apt update && \
# apt install -y ros-dev-tools \
# ros-jazzy-cv-bridge \
# ros-jazzy-generate-parameter-library \
# ros-jazzy-parameter-traits \
# ros-jazzy-ros-base \
# ros-jazzy-rqt-image-view \
# ros-jazzy-usb-cam \
# ros-jazzy-vision-msgs && \
# apt -y clean && \
# rm -rf /var/lib/apt/lists/*
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
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 && \
sed -i -e 's/ubuntu .* main/ubuntu noble main/g' /etc/apt/sources.list.d/ros2.list && \
apt update && \
apt install -y ros-dev-tools \
ros-jazzy-cv-bridge \
ros-jazzy-generate-parameter-library \
ros-jazzy-parameter-traits \
ros-jazzy-ros-base \
ros-jazzy-rqt-image-view \
ros-jazzy-usb-cam \
ros-jazzy-vision-msgs && \
apt -y clean && \
rm -rf /var/lib/apt/lists/*

# WORKDIR /workspace
# COPY ./ros_entrypoint.sh /ros_entrypoint.sh
# RUN echo "source /ros_entrypoint.sh" >> /root/.bashrc
WORKDIR /workspace
COPY ./ros_entrypoint.sh /ros_entrypoint.sh
RUN echo "source /ros_entrypoint.sh" >> /root/.bashrc

0 comments on commit c747e14

Please sign in to comment.