-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathMakefile
44 lines (39 loc) · 1.01 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
39
40
41
42
43
44
WORK_DIR=${PWD}
PROJECT=PF_Track
DOCKER_IMAGE=${PROJECT}:latest
DOCKER_FILE=docker/Dockerfile-pftrack
DATA_ROOT=/mnt/fsx/datasets
CKPTS_ROOT=/mnt/fsx/ckpts
DOCKER_OPTS = \
-it \
--rm \
-e DISPLAY=${DISPLAY} \
-v /tmp:/tmp \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /mnt/fsx:/mnt/fsx \
-v ~/.ssh:/root/.ssh \
-v ~/.aws:/root/.aws \
-v ${WORK_DIR}:/workspace/${PROJECT} \
-v ${DATA_ROOT}:/workspace/${PROJECT}/data \
-v ${CKPTS_ROOT}:/workspace/${PROJECT}/ckpts \
--shm-size=1G \
--ipc=host \
--network=host \
--pid=host \
--privileged
DOCKER_BUILD_ARGS = \
--build-arg AWS_ACCESS_KEY_ID \
--build-arg AWS_SECRET_ACCESS_KEY \
--build-arg AWS_DEFAULT_REGION \
--build-arg WANDB_ENTITY \
--build-arg WANDB_API_KEY \
docker-build:
nvidia-docker image build -f $(DOCKER_FILE) -t $(DOCKER_IMAGE) \
$(DOCKER_BUILD_ARGS) .
docker-dev:
nvidia-docker run --name $(PROJECT) \
$(DOCKER_OPTS) \
$(DOCKER_IMAGE) bash
clean:
find . -name '"*.pyc' | xargs sudo rm -f && \
find . -name '__pycache__' | xargs sudo rm -rf