| 
									
										
										
										
											2020-08-14 17:52:57 +02:00
										 |  |  | FROM my_ocrd_workflow-core | 
					
						
							| 
									
										
										
										
											2020-08-14 14:37:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-19 18:25:10 +01:00
										 |  |  | ARG PIP_INSTALL="pip install --no-cache-dir --use-feature=2020-resolver" | 
					
						
							| 
									
										
										
										
											2020-09-25 16:15:43 +02:00
										 |  |  | ARG OCRD_OLENA_VERSION="1.2.0" | 
					
						
							| 
									
										
										
										
											2020-08-14 14:37:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-25 16:11:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-14 14:37:20 +02:00
										 |  |  | # Build ocrd_olena | 
					
						
							|  |  |  | RUN apt-get update && \ | 
					
						
							|  |  |  |     apt-get install -y \ | 
					
						
							|  |  |  |       imagemagick \ | 
					
						
							|  |  |  |     && \ | 
					
						
							|  |  |  |     apt-get clean && rm -rf /var/lib/apt/lists/* | 
					
						
							|  |  |  | RUN curl -sSL --retry 3 -O https://qurator-data.de/~mike.gerber/olena_2.1-0+ocrd-git/olena-bin_2.1-0+ocrd-git_amd64.deb && \ | 
					
						
							|  |  |  |     dpkg -i --force-depends olena-bin_2.1-0+ocrd-git_amd64.deb && \ | 
					
						
							|  |  |  |     rm -f olena-bin_2.1-0+ocrd-git_amd64.deb && \ | 
					
						
							|  |  |  |     apt-get update && \ | 
					
						
							|  |  |  |     apt-get -f install -y && \ | 
					
						
							|  |  |  |     apt-get clean && rm -rf /var/lib/apt/lists/* | 
					
						
							| 
									
										
										
										
											2020-08-14 17:17:25 +02:00
										 |  |  | RUN curl -sSL --retry 3 -o ocrd_olena.tar.gz https://github.com/OCR-D/ocrd_olena/archive/v${OCRD_OLENA_VERSION}.tar.gz && \ | 
					
						
							| 
									
										
										
										
											2020-08-14 14:37:20 +02:00
										 |  |  |    mkdir ocrd_olena && \ | 
					
						
							|  |  |  |    tar xvz -C ocrd_olena --strip-components=1 -f ocrd_olena.tar.gz && \ | 
					
						
							|  |  |  |    cd ocrd_olena && \ | 
					
						
							|  |  |  |    sed -i 's/^install: deps$/install:/' Makefile && \ | 
					
						
							| 
									
										
										
										
											2020-09-25 16:11:11 +02:00
										 |  |  |    ${PIP_INSTALL} ocrd && \ | 
					
						
							| 
									
										
										
										
											2020-08-14 14:37:20 +02:00
										 |  |  |    make install PREFIX=/usr/local && \ | 
					
						
							|  |  |  |    cd .. && rm -rf ocrd_olena ocrd_olena.tar.gz | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Check pip dependencies | 
					
						
							| 
									
										
										
										
											2020-11-19 18:25:10 +01:00
										 |  |  | RUN pip check | 
					
						
							| 
									
										
										
										
											2020-08-14 14:37:20 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Default command | 
					
						
							|  |  |  | CMD ['ocrd-olena-binarize'] |