-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 745 Bytes
/
Makefile
File metadata and controls
25 lines (19 loc) · 745 Bytes
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
DOCKERFILE="Dockerfile"
DOCKER_IMAGE=foldconfbench
DOCKER_CONTAINER=foldconfbench
.PHONY: build create-container delete-container
build: delete-container
docker build -t $(DOCKER_IMAGE):latest -f $(DOCKERFILE) .
delete-container:
docker stop $(DOCKER_CONTAINER) || exit 0 && docker rm $(DOCKER_CONTAINER) || exit 0
create-container:
docker run -td \
--name $(DOCKER_CONTAINER) \
--user "$(id -u):$(id -g)" \
-v $(INPUT_DIR):/opt/data/inputs/ \
-v $(OUTPUT_DIR):/opt/data/outputs/ \
--gpus all \
$(DOCKER_IMAGE)
run: delete-container create-container
docker exec --user "$(id -u):$(id -g)" $(DOCKER_CONTAINER)\
bash -c "pip install einops && python runner.py ++input_dir=/opt/data/inputs/ ++output_dir=/opt/data/outputs/"