-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
36 lines (27 loc) · 886 Bytes
/
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
30
31
32
33
34
35
36
DIRECTORY_PATH=$(shell pwd)
IMAGE_NAME=path-planning-hga
TAG=$(shell git describe --tags --always --dirty)
CONTAINER_NAME_JUPYTER=path-planning-jupyter
# Build docker image
build:
@echo "\nBuilding Production image with labels:\n"
@echo " name: ${IMAGE_NAME}"
@echo " version: $(TAG)"
@sed \
-e 's|{NAME}|$(IMAGE_NAME)|g' \
-e 's|{VERSION}|$(TAG)|g' \
Dockerfile \
| docker build -t $(IMAGE_NAME):$(TAG) $(DIRECTORY_PATH)
# Run docker image starting the jupyter notebook
open-paper: build
docker run \
-it --rm -a stdout \
-u `id -u`:`id -g` \
-v /etc/passwd:/etc/passwd \
--name=$(CONTAINER_NAME_JUPYTER) \
-p 8888:8888 \
--entrypoint=/bin/bash \
$(IMAGE_NAME):$(TAG) \
-c "jupyter notebook \"./reports/Paper - Genetic Algorithm Applied in UAV's Path Planning.ipynb\" --ip 0.0.0.0 --allow-root"
docker-rm:
docker rm $(CONTAINER_NAME_JUPYTER)