tator icon indicating copy to clipboard operation
tator copied to clipboard

Check docker for version if experimental flag not found

Open henxing opened this issue 2 years ago • 1 comments

In the Makefile, there is a check to see if the experimental flag is enabled. This was added to ensure that the --platform argument is available, but it is also available in client versions 20.10.17 and later. Improve the check to look at the version if the experimental flag is not set or is disabled. Or maybe check the version first, then check for experimental if the version is lower than 20.10.17.

henxing avatar Sep 08 '22 14:09 henxing

Can get the major/minor/patch versions inside the makefile like so:

DOCKER_VER_NUM=$(shell docker version --format '{{json .Client.Version}}' | grep -Eo "[0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2}")
DOCKER_MAJ_VER=$(shell echo $(DOCKER_VER_NUM) | cut -f1 -d.)
DOCKER_MIN_VER=$(shell echo $(DOCKER_VER_NUM) | cut -f2 -d.)
DOCKER_PAT_VER=$(shell echo $(DOCKER_VER_NUM) | cut -f3 -d.)

henxing avatar Sep 08 '22 14:09 henxing