-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
31 lines (26 loc) · 806 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
PROJECT ?= bert-mcts
DATADIR ?= ${PWD}/data
WORKSPACE ?= /workspace/$(PROJECT)
DOCKER_IMAGE ?= ${PROJECT}:latest
SHMSIZE ?= 100G
DOCKER_OPTS := \
--name ${PROJECT} \
--rm -it \
--shm-size=${SHMSIZE} \
-v ${PWD}:${WORKSPACE} \
-v ${DATADIR}:${WORKSPACE}/data \
-v ${LOG_DIR}:${WORKSPACE}/work_dirs/logs \
-w ${WORKSPACE} \
--ipc=host \
--network=host \
--gpus all
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"
docker-run: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} \
bash -c "${COMMAND}"