From 4a5980fcd302fc794f50e782e478a3bdd77f57b2 Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Tue, 30 Mar 2021 20:07:31 +0200 Subject: [PATCH] Improve Makefile --- Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 49fdcce..da9b61d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: container check-env check-config +.PHONY: container run check-env check-config .DEFAULT_GOAL:= container export USER_ID:=$(shell id -u) @@ -6,16 +6,18 @@ export GROUP_ID:=$(shell id -g) container: check-env check-config @echo Building apps container with user_id=${USER_ID} group_id=${GROUP_ID}... - docker-compose build apps + @docker-compose build apps @echo You can run \"make run\" to test the docker installation now. +run: check-env + @echo Mounting\(read-only \) ${DATASETS} to /data. + @echo Mounting\(read-write\) $(shell realpath apps/) to /apps/ + @docker-compose run --rm apps + check-config: @echo Using the following docker configuration: @docker-compose config -run: check-env - @docker-compose run --rm apps - clean: @echo Removing docker images... -docker image rm ignaciovizzo/puma:latest @@ -24,7 +26,4 @@ clean: check-env: ifndef DATASETS $(error Please specify where your datasets are located, export DATASETS=) -else - @echo Mounting\(read-only \) ${DATASETS} to /data. - @echo Mounting\(read-write\) $(shell realpath apps/) to /apps/ endif