-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
38 lines (31 loc) · 1.11 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
30
31
32
33
34
35
36
37
38
PROJECT ?= signate_jpx
DATADIR ?= ${PWD}/data
WORKSPACE ?= /workspace/$(PROJECT)
DOCKER_IMAGE ?= ${PROJECT}:latest
SUBMIT_NAME ?= tutorial
LOCAL_UID ?= 1000
LOCAL_GID ?= 1000
DOCKER_OPTS := \
--name ${PROJECT} \
--rm -it \
-v ${PWD}:${WORKSPACE} \
-w ${WORKSPACE} \
--network=host \
-e LOCAL_UID=${LOCAL_UID} \
-e LOCAL_GID=${LOCAL_GID}
docker-build:
docker build -f docker/Dockerfile -t ${DOCKER_IMAGE} .
docker-start-interactive: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} bash
docker-start-jupyter: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} \
bash -c "jupyter lab --port=8888 --ip=0.0.0.0 --allow-root --no-browser --NotebookApp.token='' --NotebookApp.password=''"
docker-run: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} \
bash -c "${COMMAND}"
docker-create-submit-files: docker-build
docker run ${DOCKER_OPTS} --memory=8gb ${DOCKER_IMAGE} \
bash -c "python tools/check_submit_files.py ${SUBMIT_NAME}"
docker-validate-submit-files: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} \
bash -c "python tools/check_submit_files.py ${SUBMIT_NAME} --validate"