From 1884ea389bb4de21f60adb699b51ef4d1b4cd32a Mon Sep 17 00:00:00 2001 From: aagustinconti Date: Tue, 15 Nov 2022 12:24:10 -0300 Subject: [PATCH] Detect if the image has already installed --- start.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/start.sh b/start.sh index 9ef31f2..87280bb 100755 --- a/start.sh +++ b/start.sh @@ -29,11 +29,18 @@ # Create the image of torch -echo "Building the Docker Image..." +echo "Checking if the Image already exists..." + +if [[ "$(docker image inspect yolov7_detect_track_count:latest 2> /dev/null)" == "" ]]; then + + echo "The image doesn't exist. Building the Docker Image..." + + cd ./dependencies + docker build -t yolov7_detect_track_count . + cd .. + +fi -cd ./dependencies -docker build -t yolov7_detect_track_count . -cd .. # And then run # 1. To allow the use of screen