mirror of
				https://github.com/qurator-spk/ocrd-galley.git
				synced 2025-10-30 02:34:13 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			825 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			825 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/bin/bash
 | |
| set -e
 | |
| 
 | |
| self=`realpath $0`
 | |
| self_dir=`dirname "$self"`
 | |
| 
 | |
| 
 | |
| 
 | |
| if [ -n "$1" ]; then
 | |
|   sub_images=""
 | |
|   for arg in "$@"; do
 | |
|     arg_sub_image=`echo "$arg" | sed 's/Dockerfile-//'`
 | |
|     NL=$'\n'
 | |
|     sub_images+="$NL$arg_sub_image"
 | |
|   done
 | |
| else
 | |
|   sub_images=`ls -1 Dockerfile-core* | sed 's/Dockerfile-//'`
 | |
|   sub_images="$sub_images `ls -1 Dockerfile-* | sed 's/Dockerfile-//'`"
 | |
| fi
 | |
| echo "Building:"
 | |
| echo "$sub_images"
 | |
| echo
 | |
| 
 | |
| 
 | |
| # Update base images if we build a core image
 | |
| if echo "$sub_images" | grep -q core; then
 | |
|   docker pull ubuntu:18.04
 | |
|   docker pull nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04
 | |
|   docker pull nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04
 | |
| fi
 | |
| 
 | |
| for sub_image in $sub_images; do
 | |
|   docker build --cache-from=quratorspk/ocrd-galley-$sub_image -t quratorspk/ocrd-galley-$sub_image -f Dockerfile-$sub_image .
 | |
| done
 |