Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
Working dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornborg committed May 30, 2018
1 parent 3491874 commit 86d8187
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions example/Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
# Part to build example.
FROM resin/amd64-debian:buster as builder
# Do not use apt-get upgrade, something breaks...
RUN apt-get update -y && apt-get install -y apt-utils #&& apt-get upgrade -y
RUN apt-get install -y cmake g++ libopencv-dev libopencv-core-dev libopencv-highgui-dev make
RUN apt-get update -y && apt-get install -y apt-utils
RUN apt-get install -y libopencv-dev libopencv-core-dev libopencv-highgui-dev
RUN apt-get install -y cmake g++ make

ADD . /opt/sources
WORKDIR /opt/sources
Expand All @@ -30,7 +31,7 @@ RUN mkdir build && \
# Part to deploy example.
FROM resin/amd64-debian:buster
RUN apt-get -y update
RUN apt-get -y install libopencv-calib3d3.2 libopencv-contrib3.2 libopencv-core3.2 libopencv-features2d3.2 libopencv-flann3.2 libopencv-highgui3.2 libopencv-imgcodecs3.2 libopencv-imgproc3.2 libopencv-ml3.2 libopencv-objdetect3.2 libopencv-photo3.2 libopencv-shape3.2 libopencv-stitching3.2 libopencv-superres3.2 libopencv-video3.2 libopencv-videoio3.2 libopencv-videostab3.2 libopencv-viz3.2
RUN apt-get install -y libopencv-dev libopencv-core-dev libopencv-highgui-dev

WORKDIR /usr/bin
COPY --from=builder /tmp/bin/example .
10 changes: 5 additions & 5 deletions example/Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
FROM resin/armv7hf-debian:buster as builder
RUN [ "cross-build-start" ]
RUN apt-get update -y && apt-get install -y apt-utils
RUN apt-get install -y cmake g++ libopencv-dev libopencv-core-dev libopencv-highgui-dev make
RUN apt-get install -y libopencv-dev libopencv-core-dev libopencv-highgui-dev
RUN apt-get install -y cmake g++ make

ADD . /opt/sources
WORKDIR /opt/sources
Expand All @@ -29,11 +30,10 @@ RUN [ "cross-build-end" ]


# Part to deploy example.
FROM resin/raspberry-pi-debian:buster
FROM resin/armv7hf-debian:buster
RUN [ "cross-build-start" ]
RUN apt-get -y update
RUN apt-get -y install libopencv-calib3d3.2 libopencv-contrib3.2 libopencv-core3.2 libopencv-features2d3.2 libopencv-flann3.2 libopencv-highgui3.2 libopencv-imgcodecs3.2 libopencv-imgproc3.2 libopencv-ml3.2 libopencv-objdetect3.2 libopencv-photo3.2 libopencv-shape3.2 libopencv-stitching3.2 libopencv-superres3.2 libopencv-video3.2 libopencv-videoio3.2 libopencv-videostab3.2 libopencv-viz3.2

RUN apt-get update -y && apt-get install -y apt-utils
RUN apt-get install -y libopencv-dev libopencv-core-dev libopencv-highgui-dev
WORKDIR /usr/bin
COPY --from=builder /tmp/bin/example .

Expand Down
2 changes: 1 addition & 1 deletion example/src/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int32_t main(int32_t argc, char **argv) {
retCode = 1;
} else {
bool const VERBOSE{commandlineArguments.count("verbose") != 0};
bool const TRAINCNN{std::stoi(commandlineArguments["cid"]) == 1};
bool const TRAINCNN{std::stoi(commandlineArguments["traincnn"]) == 1};
uint32_t const WIDTH{1280};
uint32_t const HEIGHT{960};
uint32_t const BPP{24};
Expand Down

0 comments on commit 86d8187

Please sign in to comment.