From b413cfe469bc86d710b596da2622a31b8b50e655 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Tue, 23 Aug 2022 18:48:44 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Update=20base=20images=20if=20we=20?= =?UTF-8?q?build=20a=20core=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build b/build index a1e36f9..e8a7c2d 100755 --- a/build +++ b/build @@ -28,12 +28,21 @@ get_from_web() { . $self_dir/qurator_data_lib.sh handle_data + if [ -n "$1" ]; then sub_images=`echo "$@" | sed 's/Dockerfile-//'` else sub_images=`ls -1 Dockerfile-core* | sed 's/Dockerfile-//'` sub_images="$sub_images `ls -1 Dockerfile-* | sed 's/Dockerfile-//'`" fi + +# 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