-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detectcone cleanup #3
Open
arbulgazar
wants to merge
16
commits into
master
Choose a base branch
from
detectcone_cleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
688308f
Repository refactoring and cleanup
arbulgazar e5ad740
Adds automatic cluon get from server
arbulgazar a0ff580
Removes static cluon header
arbulgazar a5091b5
Add some comments in main function
ruguangyou 5c8ffcd
Update README.md
ruguangyou 3e8b9c8
Merge branch 'detectcone_cleanup' of https://github.com/chalmersfsd/c…
ruguangyou 1305f5f
Update README.md, add od4 message input and output
ruguangyou 0153e52
Update README.md
ruguangyou 0666785
Update README.md (cone color labels)
ruguangyou c1ae065
Fix missing thirdparty dir
arbulgazar d191825
Cleaned up some temporary files
bjornborg 01b5f3a
Removed the config file
bjornborg 580d74d
Cleaned up cmake module mess, turns out that we didn't need them
bjornborg 50c575e
Disabled upx compression for binary
bjornborg ca24691
slim down by only copying dependent libraries (image size: 393MB -> 7…
ruguangyou efbea17
Merge pull request #4 from chalmersfsd/detectcone_cleanup.patch
bjornborg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build | ||
command | ||
tmp |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,47 +13,46 @@ | |
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# Part to build opendlv-perception-vision-orbslam2. | ||
FROM alpine:edge as builder | ||
MAINTAINER Christian Berger "[email protected]" | ||
# Part to build opendlv-perception-vision-orbslam2. | ||
FROM alpine:3.8 as builder | ||
# Deprecated, use label (see docker docs) | ||
# MAINTAINER Christian Berger "[email protected]" | ||
#Get OS stuff | ||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | ||
RUN apk update && \ | ||
RUN apk update && apk upgrade && \ | ||
apk --no-cache add \ | ||
cmake \ | ||
#bash \ | ||
g++ \ | ||
make \ | ||
upx \ | ||
git \ | ||
mercurial \ | ||
# mercurial \ | ||
libmount \ | ||
libtbb@testing \ | ||
libtbb-dev@testing \ | ||
opencv-dev@testing | ||
opencv@testing \ | ||
opencv-dev@testing \ | ||
libgomp \ | ||
libtbb@testing \ | ||
libtbb-dev@testing \ | ||
openblas \ | ||
openblas-dev | ||
|
||
WORKDIR /tmp | ||
ADD ./config.h /opt/sources/config.h | ||
|
||
RUN git clone https://github.com/justusc/FindTBB.git && \ | ||
cp FindTBB/FindTBB.cmake /usr/share/cmake/Modules/ | ||
|
||
RUN git clone https://github.com/tiny-dnn/tiny-dnn.git && \ | ||
mkdir -p tiny-dnn/build && \ | ||
cp /opt/sources/config.h tiny-dnn/tiny_dnn/config.h && \ | ||
cd tiny-dnn/build && \ | ||
cmake .. && \ | ||
make install | ||
|
||
RUN git clone https://github.com/eigenteam/eigen-git-mirror.git && \ | ||
RUN git clone --depth 1 https://github.com/eigenteam/eigen-git-mirror.git && \ | ||
mkdir -p eigen-git-mirror/build && \ | ||
cd eigen-git-mirror/build && \ | ||
cmake .. && \ | ||
make install | ||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | ||
RUN apk update && \ | ||
apk --no-cache add \ | ||
opencv@testing | ||
|
||
RUN git clone --depth 10 https://github.com/tiny-dnn/tiny-dnn.git && \ | ||
mkdir -p tiny-dnn/build && \ | ||
cd tiny-dnn/build && \ | ||
# Temp fix for the recent compilation error | ||
git checkout 1aec6a1ece0ba7a5e018a070bd52e045d49d1411 && \ | ||
cmake -DUSE_TBB=ON -DUSE_OMP=ON .. && \ | ||
make install | ||
|
||
ADD . /opt/sources/ | ||
|
||
|
@@ -62,17 +61,98 @@ WORKDIR /opt/sources | |
RUN mkdir -p build && \ | ||
cd build && \ | ||
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/tmp/cfsd18-perception-detectcone-dest .. && \ | ||
make -j3 && make test && make install && upx -9 /tmp/cfsd18-perception-detectcone-dest/bin/cfsd18-perception-detectcone | ||
make -j3 && make test && make install | ||
# mkdir -p /usr/lib/dependency && \ | ||
# cp $(ldd cfsd18-perception-detectcone | awk '/\/usr\/bin/ {print $3}') /usr/lib/dependency/ | ||
# && upx -9 /tmp/cfsd18-perception-detectcone-dest/bin/cfsd18-perception-detectcone | ||
|
||
# Part to deploy opendlv-perception-vision-orbslam2 | ||
FROM alpine:edge | ||
MAINTAINER Christian Berger "[email protected]" | ||
# Deprecated, use label (see docker docs) | ||
# MAINTAINER Christian Berger "[email protected]" | ||
RUN apk update && \ | ||
apk --no-cache add \ | ||
glib | ||
|
||
#Start microservice | ||
WORKDIR /usr/bin | ||
COPY --from=builder /usr/local/include/ /usr/include/ | ||
COPY --from=builder /usr/local/lib/ /usr/lib/ | ||
COPY --from=builder /usr/lib/ /usr/lib/ | ||
# This will make the image heavy... Do we need all of them? | ||
# This could be slimmed down | ||
# Nothing in the builder's /usr/local/lib | ||
# COPY --from=builder /usr/local/lib/ /usr/lib/ | ||
# COPY --from=builder /usr/lib/ /usr/lib/ | ||
|
||
# COPY --from=builder /usr/lib/dependency/ /usr/lib/ | ||
# Tried to copy from /usr/lib/dependency/ | ||
# but " ldd cfsd18-perception-detectcone | awk '{print $3}' " output nothing (i.e. line 66 failed) | ||
# instead, use the manual and tedious way | ||
# image size: 393MB -> 79.1MB | ||
COPY --from=builder /usr/lib/libopencv_calib3d.so.3.2 \ | ||
/usr/lib/libopencv_features2d.so.3.2 \ | ||
/usr/lib/libopencv_flann.so.3.2 \ | ||
/usr/lib/libopencv_highgui.so.3.2 \ | ||
/usr/lib/libopencv_imgcodecs.so.3.2 \ | ||
/usr/lib/libopencv_imgproc.so.3.2 \ | ||
/usr/lib/libopencv_core.so.3.2 \ | ||
/usr/lib/libstdc++.so.6 \ | ||
/usr/lib/libgcc_s.so.1 \ | ||
/usr/lib/libgtk-3.so.0 \ | ||
/usr/lib/libgdk-3.so.0 \ | ||
/usr/lib/libcairo.so.2 \ | ||
/usr/lib/libgdk_pixbuf-2.0.so.0 \ | ||
/usr/lib/libgobject-2.0.so.0 \ | ||
/usr/lib/libglib-2.0.so.0 \ | ||
/usr/lib/libjpeg.so.8 \ | ||
/usr/lib/libwebp.so.7 \ | ||
/usr/lib/libpng16.so.16 \ | ||
/usr/lib/libtiff.so.5 \ | ||
/usr/lib/libjasper.so.4 \ | ||
/usr/lib/libIlmImf-2_2.so.23 \ | ||
/usr/lib/libHalf.so.12 \ | ||
/usr/lib/libgomp.so.1 \ | ||
/usr/lib/libgmodule-2.0.so.0 \ | ||
/usr/lib/libpangocairo-1.0.so.0 \ | ||
/usr/lib/libX11.so.6 \ | ||
/usr/lib/libXi.so.6 \ | ||
/usr/lib/libXfixes.so.3 \ | ||
/usr/lib/libcairo-gobject.so.2 \ | ||
/usr/lib/libatk-1.0.so.0 \ | ||
/usr/lib/libatk-bridge-2.0.so.0 \ | ||
/usr/lib/libepoxy.so.0 \ | ||
/usr/lib/libpangoft2-1.0.so.0 \ | ||
/usr/lib/libpango-1.0.so.0 \ | ||
/usr/lib/libfontconfig.so.1 \ | ||
/usr/lib/libgio-2.0.so.0 \ | ||
/usr/lib/libintl.so.8 \ | ||
/usr/lib/libXinerama.so.1 \ | ||
/usr/lib/libXrandr.so.2 \ | ||
/usr/lib/libXcursor.so.1 \ | ||
/usr/lib/libXcomposite.so.1 \ | ||
/usr/lib/libXdamage.so.1 \ | ||
/usr/lib/libxkbcommon.so.0 \ | ||
/usr/lib/libwayland-cursor.so.0 \ | ||
/usr/lib/libwayland-egl.so.1 \ | ||
/usr/lib/libwayland-client.so.0 \ | ||
/usr/lib/libXext.so.6 \ | ||
/usr/lib/libpixman-1.so.0 \ | ||
/usr/lib/libfreetype.so.6 \ | ||
/usr/lib/libxcb-shm.so.0 \ | ||
/usr/lib/libxcb.so.1 \ | ||
/usr/lib/libxcb-render.so.0 \ | ||
/usr/lib/libXrender.so.1 \ | ||
/usr/lib/libffi.so.6 \ | ||
/usr/lib/libpcre.so.1 \ | ||
/usr/lib/libIex-2_2.so.12 \ | ||
/usr/lib/libIlmThread-2_2.so.12 \ | ||
/usr/lib/libatspi.so.0 \ | ||
/usr/lib/libdbus-1.so.3 \ | ||
/usr/lib/libharfbuzz.so.0 \ | ||
/usr/lib/libexpat.so.1 \ | ||
/usr/lib/libbz2.so.1 \ | ||
/usr/lib/libXau.so.6 \ | ||
/usr/lib/libXdmcp.so.6 \ | ||
/usr/lib/libgraphite2.so.3 \ | ||
/usr/lib/libbsd.so.0 \ | ||
/usr/lib/ | ||
COPY --from=builder /tmp/cfsd18-perception-detectcone-dest/bin/cfsd18-perception-detectcone . | ||
RUN apk update && apk add glib | ||
CMD ["/usr/bin/cfsd18-perception-detectcone"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to change the header author to Cfsd instead of Christian :D @chrberger .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please :-)