Starting work on docker images, added curl to linking
This commit is contained in:
		@@ -92,5 +92,6 @@ find_package(PkgConfig REQUIRED)
 | 
				
			|||||||
pkg_search_module(opencv REQUIRED IMPORTED_TARGET opencv)
 | 
					pkg_search_module(opencv REQUIRED IMPORTED_TARGET opencv)
 | 
				
			||||||
target_link_libraries(checks-parser PRIVATE PkgConfig::opencv)
 | 
					target_link_libraries(checks-parser PRIVATE PkgConfig::opencv)
 | 
				
			||||||
target_link_libraries(checks-parser PRIVATE -ltesseract)
 | 
					target_link_libraries(checks-parser PRIVATE -ltesseract)
 | 
				
			||||||
 | 
					target_link_libraries(checks-parser PRIVATE -lcurl)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										39
									
								
								Docker/archlinux/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								Docker/archlinux/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
				
			|||||||
 | 
					FROM archlinux
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Update
 | 
				
			||||||
 | 
					RUN pacman --noconfirm -Sy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Build dependencies
 | 
				
			||||||
 | 
					RUN pacman --noconfirm -S sudo cmake git coreutils base-devel eigen
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Dependencies from repos
 | 
				
			||||||
 | 
					RUN pacman --noconfirm -S qt5-base mbedtls
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN echo "MAKEFLAGS=\"-j${nproc}\"" >> /etc/makepkg.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN useradd -ms /bin/bash checks-parser
 | 
				
			||||||
 | 
					RUN usermod -a -G wheel checks-parser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN echo "checks-parser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
 | 
				
			||||||
 | 
					USER checks-parser
 | 
				
			||||||
 | 
					WORKDIR /home/checks-parser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Dependencies from sources
 | 
				
			||||||
 | 
					RUN git clone https://aur.archlinux.org/yay.git && \
 | 
				
			||||||
 | 
					    cd yay && \
 | 
				
			||||||
 | 
					    makepkg -si --noconfirm && \
 | 
				
			||||||
 | 
					    cd .. && sudo rm -rf yay
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN yay -Sy --noconfirm gtkglext
 | 
				
			||||||
 | 
					RUN yay -S --noconfirm cpr opencv2 nlohmann-json tesseract tesseract-data-rus
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#building
 | 
				
			||||||
 | 
					WORKDIR /home/checks-parser
 | 
				
			||||||
 | 
					RUN git clone https://git.foxarmy.org/leca/checks-parser && \
 | 
				
			||||||
 | 
					    cd checks-parser && \
 | 
				
			||||||
 | 
					    mkdir build && cd build && \
 | 
				
			||||||
 | 
					    cmake .. && \
 | 
				
			||||||
 | 
					    make -j ${nproc} && \
 | 
				
			||||||
 | 
					    sudo make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENTRYPOINT ["checks-parser"]
 | 
				
			||||||
							
								
								
									
										34
									
								
								Docker/debian/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								Docker/debian/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					FROM debian:bullseye
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Update
 | 
				
			||||||
 | 
					RUN apt update -y && apt upgrade -y
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Build dependencies
 | 
				
			||||||
 | 
					RUN apt install -y git build-essential cmake 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Dependencies from repos (qt5, openssl, tesseract and lang package)
 | 
				
			||||||
 | 
					RUN apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Dependencies from sources 
 | 
				
			||||||
 | 
					#cpr
 | 
				
			||||||
 | 
					WORKDIR /root
 | 
				
			||||||
 | 
					RUN git clone https://github.com/whoshuu/cpr.git && \
 | 
				
			||||||
 | 
					    cd cpr && \
 | 
				
			||||||
 | 
					    mkdir build && cd build && \
 | 
				
			||||||
 | 
					    cmake .. && \
 | 
				
			||||||
 | 
					    make -j ${nproc} && \
 | 
				
			||||||
 | 
					    make install && \
 | 
				
			||||||
 | 
					    cd /root && rm -rf cpr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#building
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WORKDIR /root
 | 
				
			||||||
 | 
					RUN git clone https://git.foxarmy.org/leca/checks-parser && \
 | 
				
			||||||
 | 
					    cd checks-parser && \
 | 
				
			||||||
 | 
					    mkdir build && cd build &&\
 | 
				
			||||||
 | 
					    cmake .. && \
 | 
				
			||||||
 | 
					    make -j ${nproc} && \
 | 
				
			||||||
 | 
					    make install && \
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					ENTRYPOINT ["checks-parser"]
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#include <string>
 | 
					#include <string>
 | 
				
			||||||
#include <tesseract/baseapi.h>
 | 
					#include <tesseract/baseapi.h>
 | 
				
			||||||
#include <leptonica/allheaders.h>
 | 
					#include <leptonica/allheaders.h>
 | 
				
			||||||
#include <opencv2/opencv.hpp>
 | 
					#include <opencv4/opencv2/opencv.hpp>
 | 
				
			||||||
#include "checkimage.h"
 | 
					#include "checkimage.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CheckImage::CheckImage(std::string path) {
 | 
					CheckImage::CheckImage(std::string path) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,7 +80,7 @@
 | 
				
			|||||||
     </rect>
 | 
					     </rect>
 | 
				
			||||||
    </property>
 | 
					    </property>
 | 
				
			||||||
    <property name="currentIndex">
 | 
					    <property name="currentIndex">
 | 
				
			||||||
     <number>1</number>
 | 
					     <number>0</number>
 | 
				
			||||||
    </property>
 | 
					    </property>
 | 
				
			||||||
    <widget class="QWidget" name="page_5">
 | 
					    <widget class="QWidget" name="page_5">
 | 
				
			||||||
     <widget class="QLabel" name="checkContentLabel">
 | 
					     <widget class="QLabel" name="checkContentLabel">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user