Skip to content

Commit

Permalink
Improve Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonghi committed Aug 30, 2022
1 parent 992cbba commit a35d768
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
nanosaur_tools
Dockerfile*
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These are supported funding model platforms

github: rbonghi
patreon: rbonghi
custom: https://rnext.it
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,24 @@ ENV CUDA=10.2
# Disable terminal interaction for apt
ENV DEBIAN_FRONTEND=noninteractive

################ NANOSAUR PKGS ####################

# Download and build nanosaur_ei
ENV ROS_WS /opt/ros_ws

# Copy wstool ei.rosinstall
COPY nanosaur_ei/rosinstall/ei.rosinstall ei.rosinstall

RUN mkdir -p ${ROS_WS}/src && \
vcs import ${ROS_WS}/src < ei.rosinstall

ADD . $ROS_WS/src/nanosaur_ei

# Change workdir
WORKDIR $ROS_WS

# Build nanosaur edge impulse package
RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \
colcon build --symlink-install \
--cmake-args \
-DCMAKE_BUILD_TYPE=Release
50 changes: 50 additions & 0 deletions nanosaur_ei/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2022, Raffaello Bonghi <[email protected]>
All rights reserved
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>nanosaur_ei</name>
<version>0.1.0</version>
<description>nanosaur edge impulse</description>

<author email="[email protected]">Raffaello Bonghi</author>
<maintainer email="[email protected]">Raffaello Bonghi</maintainer>
<license>MIT</license>

<url type="website">https://nanosaur.ai/</url>
<url type="repository">https://github.com/rnanosaur/nanosaur_ei</url>
<url type="bugtracker">https://github.com/rnanosaur/nanosaur_ei/issues</url>

<buildtool_depend>ament_cmake</buildtool_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
8 changes: 8 additions & 0 deletions nanosaur_ei/rosinstall/ei.rosinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- git:
local-name: nanosaur
version: foxy
uri: https://github.com/rnanosaur/nanosaur.git
- git:
local-name: edgeimpulse_ros
version: 0.0.1
uri: https://github.com/gbr1/edgeimpulse_ros.git

0 comments on commit a35d768

Please sign in to comment.