Skip to content

Commit

Permalink
Improve Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
nachovizzo committed Mar 30, 2021
1 parent 25e189f commit 4a5980f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
.PHONY: container check-env check-config
.PHONY: container run check-env check-config
.DEFAULT_GOAL:= container

export USER_ID:=$(shell id -u)
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
Expand All @@ -24,7 +26,4 @@ clean:
check-env:
ifndef DATASETS
$(error Please specify where your datasets are located, export DATASETS=<path>)
else
@echo Mounting\(read-only \) ${DATASETS} to /data.
@echo Mounting\(read-write\) $(shell realpath apps/) to /apps/
endif

0 comments on commit 4a5980f

Please sign in to comment.