-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from rueyaa332266/fix/cxxopts
Fix Dockerfile to reduce images size
- Loading branch information
Showing
5 changed files
with
32 additions
and
20 deletions.
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,10 +1,20 @@ | ||
FROM rhikimochi/opencv-docker:v0.14 | ||
FROM rhikimochi/opencv-docker:v0.14 as builder | ||
|
||
COPY . /run | ||
WORKDIR /run | ||
COPY . /app | ||
WORKDIR /app | ||
RUN mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make | ||
RUN mv bin/gazosan /usr/local/bin | ||
RUN rm -r /run/* | ||
|
||
FROM ubuntu:rolling | ||
WORKDIR /app | ||
COPY --from=builder /app/bin/gazosan /usr/local/bin | ||
COPY --from=builder /usr/local/lib/ /usr/local/lib/ | ||
COPY --from=builder /lib/x86_64-linux-gnu/libjpeg.so.8 \ | ||
/lib/x86_64-linux-gnu/libpng16.so.16 \ | ||
/lib/x86_64-linux-gnu/libtiff.so.5 \ | ||
/lib/x86_64-linux-gnu/libtbb.so.2 \ | ||
/lib/x86_64-linux-gnu/libwebp.so.6 \ | ||
/lib/x86_64-linux-gnu/libjbig.so.0 \ | ||
/lib/x86_64-linux-gnu/ |
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
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,20 +1,22 @@ | ||
#include <iostream> | ||
|
||
int ImgSegMain(int argc, char* argv[]); | ||
int ImgSegMain(int argc, const char** argv); | ||
bool GetTimeHHMMSS(tm* pTM, std::string& strHHMMSS); | ||
|
||
int main(int argc, char* argv[]) | ||
int main(int argc, const char** argv) | ||
{ | ||
std::string strHHMMSS_Start; | ||
GetTimeHHMMSS(NULL, strHHMMSS_Start); | ||
|
||
std::cout << "Start detection" << std::endl; | ||
|
||
//ImgSeg | ||
ImgSegMain(argc, argv); | ||
|
||
std::string strHHMMSS_End; | ||
GetTimeHHMMSS(NULL, strHHMMSS_End); | ||
|
||
std::clog << "Process time : " << strHHMMSS_Start << " - " << strHHMMSS_End << std::endl; | ||
std::cout << "Process time : " << strHHMMSS_Start << " - " << strHHMMSS_End << std::endl; | ||
|
||
return 0; | ||
} |
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