-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (35 loc) · 1.42 KB
/
Makefile
File metadata and controls
40 lines (35 loc) · 1.42 KB
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
#################################################################################
# GLOBALS #
#################################################################################
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROJECT_NAME = simcoder
PWD := $(shell pwd)
# docker options
DOCKER_IMAGE_NAME = simcoder
# docker build process info
LOCAL_USER = $(USER)
LOCAL_UID = $(shell id -u)
LOCAL_GID = $(shell id -g)
#################################################################################
# CONTAINER COMMANDS #
#################################################################################
docker_image:
docker build -t $(DOCKER_IMAGE_NAME) .
docker_run_elnuevo_interactive:
docker run \
--gpus all \
--name $(LOCAL_USER)-$(DOCKER_IMAGE_NAME) \
-v /home/$(LOCAL_USER)/development/simcoder:/workspace/${PROJECT_NAME} \
-v /home/$(LOCAL_USER)/datasets/mf/images:/input \
-v /home/$(LOCAL_USER)/results/similarity:/output \
-it $(DOCKER_IMAGE_NAME):latest
run_batch:
docker run \
--rm \
-u $(LOCAL_UID):$(LOCAL_GID) \
--gpus all \
--name $(LOCAL_USER)-$(DOCKER_IMAGE_NAME) \
-v /home/$(LOCAL_USER)/datasets/mf/images:/input \
-v /home/$(LOCAL_USER)/results/similarity:/output \
-it $(DOCKER_IMAGE_NAME):latest \
/input /output --format=csv --chunksize=10000