diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f609e9d..84c35e9 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -33,10 +33,16 @@ jobs: include: - dockerfile: ros-kinetic/Dockerfile image: ghcr.io/vanttec/ros-kinetic + path: ros-kinetic/ - dockerfile: rllib_trainer/Dockerfile image: ghcr.io/vanttec/rllib_trainer + path: rllib_trainer/ - dockerfile: sdv_ros2_foxy/Dockerfile image: ghcr.io/vanttec/sdv_ros2_foxy + path: sdv_ros2_foxy/ + - dockerfile: cuda-jetpack-5.0.2/Dockerfile + image: ghcr.io/vantec/cuda-jetpack-5.0.2 + path: cuda-jetpack-5.0.2/ steps: - name: Checkout repository uses: actions/checkout@v3 @@ -78,11 +84,12 @@ jobs: id: build-and-push uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a with: - context: . + context: ${{ matrix.path }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} file: ${{ matrix.dockerfile }} + path: ${{ matrix.path }} # Sign the resulting Docker image digest except on PRs. # This will only write to the public Rekor transparency log when the Docker diff --git a/README.md b/README.md index 96fc7ca..8c64ae4 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,5 @@ General purpose ros-kinetic image with acados and other USV dependencies. General purpose sdv ros2 image and scripts. ### rllib_trainer Used for rllib training. +### cuda-jetpack-5.0.2 +General Purpose image installed with CUDA, ROS Noetic, OpenCV, Pangolin and other useful dependencies. diff --git a/cuda-jetpack-5.0.2/Dockerfile b/cuda-jetpack-5.0.2/Dockerfile new file mode 100644 index 0000000..e6e1e4f --- /dev/null +++ b/cuda-jetpack-5.0.2/Dockerfile @@ -0,0 +1,102 @@ +FROM nvcr.io/nvidia/l4t-jetpack:r35.1.0 + +RUN apt-get update + +ARG DEBIAN_FRONTEND=noninteractive + # Installing Base Tools +RUN apt-get update && apt-get install -y \ + gnupg2 \ + curl \ + lsb-core \ + vim wget \ + python3-pip \ + libpng16-16 \ + libjpeg-turbo8 \ + libtiff5 \ + build-essential \ + cmake \ + git \ + unzip \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* + + # Installing ROS-noetic +RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' && \ + apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && \ + curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | apt-key add - && \ + apt-get update && apt-get install -y \ + ros-noetic-desktop-full \ + python3-rosdep \ + python3-rosinstall \ + python3-rosinstall-generator \ + python3-wstool \ + ros-noetic-sophus \ + && rm -rf /var/lib/apt/lists/* && \ + rosdep init && rosdep update && \ + echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc + + # Intalling python-catkin +RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list' && \ + wget http://packages.ros.org/ros.key -O - | sudo apt-key add - && \ + apt-get update && apt-get install -y \ + python3-catkin-tools \ + software-properties-common \ + && rm -rf /var/lib/apt/lists/* + +RUN apt-get update && apt-get install -y \ + # Pangolin dependencies + libgl1-mesa-dev \ + libglew-dev \ + libpython2.7-dev \ + libeigen3-dev \ + apt-transport-https \ + ca-certificates\ + software-properties-common \ + # Build OpenCV Dependencies + python3-dev \ + python3-numpy \ + python-dev \ + python-numpy \ + libavcodec-dev \ + libavformat-dev \ + libswscale-dev \ + libgstreamer-plugins-base1.0-dev \ + libgstreamer1.0-dev \ + libgtk-3-dev \ + libopencv-dev \ + python3-opencv \ + && rm -rf /var/lib/apt/lists/* + + + # Build Pangolin +RUN cd /tmp && git clone https://github.com/stevenlovegrove/Pangolin && \ + cd Pangolin && git checkout v0.6 && mkdir build && cd build && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-std=c++11 .. && \ + make -j$nproc && make install && \ + cd / && rm -rf /tmp/Pangolin + + # Install Open CV from source +RUN cd /tmp && git clone https://github.com/opencv/opencv/ && \ + git clone https://github.com/opencv/opencv_contrib/ && \ + cd /tmp/opencv && \ + mkdir build && cd build && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-std=c++11 -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules .. && \ + make -j4 && make install && \ + cd / && rm -rf /tmp/opencv && rm -rf /tmp/opencv_contrib + + # Set Python3 as default +RUN apt-get update && apt-get install -y \ + python-is-python3 \ + && rm -rf /var/lib/apt/lists/* + +ENV ROS_DISTRO noetic +ENV LANG en_US.UTF-8 +RUN ["/bin/bash"] +#ENTRYPOINT ["/ros_entrypoint.sh"] + +USER $USERNAME +# terminal colors with xterm +ENV TERM xterm +RUN mkdir /ws +WORKDIR /ws +CMD ["bash"]