-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
29 lines (22 loc) · 1.06 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
include .env
NS ?= mrjob
VERSION ?= latest
IMAGE_NAME ?= mrjob
CONTAINER_NAME ?= mrjob
CONTAINER_INSTANCE ?= default
.PHONY: default
default: help;
help: ## Show this help.
@echo '--------------------------------------------------------------------------------'
@echo 'MRJob'
@echo '--------------------------------------------------------------------------------'
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
@echo '--------------------------------------------------------------------------------'
build: ## Build the project image from the Dockerfile
@unzip -o data/shortjokes_small.zip -d data/
@unzip -o data/shortjokes_complete.zip -d data/
@docker build -t $(NS)/$(IMAGE_NAME):$(VERSION) -f docker/mrjob/Dockerfile .
shell: ## Run bash interactively in the container
@docker run --rm --name $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) -i -t $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(IMAGE_NAME):$(VERSION) /bin/bash
notebook: ## Start a jupyter notebook stack
@docker run -it --rm -p 8888:8888 jupyter/minimal-notebook