Created
July 11, 2019 01:44
-
-
Save aagnone3/851c97274a815f7ba5c6ffb0933651c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use the name of the current directory as the docker image tag | |
DOCKERFILE ?= Dockerfile | |
DOCKER_TAG ?= $(shell echo ${PWD} | rev | cut -d/ -f1 | rev) | |
DOCKER_IMAGE = ${DOCKER_USERNAME}/${DOCKER_REPO}:${DOCKER_TAG} | |
$(DOCKERFILE): requirements.txt | |
docker build \ | |
-t ${DOCKER_IMAGE} \ | |
-f ${DOCKERFILE} \ | |
. | |
.PHONY image | |
image: $(DOCKERFILE) | |
.PHONY: run | |
run: | |
nvidia-docker run \ | |
--mount type=bind,source="$(shell pwd)",target=/opt \ | |
-i \ | |
--rm \ | |
-t $(DOCKER_IMAGE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment