forked from vt-vl-lab/3d-photo-inpainting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (24 loc) · 1.24 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
.PHONY: build build-nocache rebuild start stop restart logs start-console stop-console
IMGAUTHOR=sbetzin
IMGNAME=3d-photo-inpainting
IMGTAG=1.0.1
build:
sudo nvidia-docker build -f Dockerfile -t $(IMGAUTHOR)/$(IMGNAME):$(IMGTAG) .
build-nocache:
sudo nvidia-docker build -f Dockerfile --no-cache -t $(IMGAUTHOR)/$(IMGNAME):$(IMGTAG) .
start:
sudo nvidia-docker run -d --gpus '"device=1"' -e AzureStorageConnectionString --name $(IMGNAME) -v ~/depth:/depth -v ~/mesh:/mesh -v /root/OneDrive/_nft:/nft --restart=unless-stopped $(IMGAUTHOR)/$(IMGNAME):$(IMGTAG)
stop:
sudo nvidia-docker stop $(shell sudo docker ps -q --filter "name=$(IMGNAME)")
sudo nvidia-docker container prune --force
logs:
sudo nvidia-docker logs $(shell sudo docker ps -q --filter "name=$(IMGNAME)") -f
start-console:
sudo nvidia-docker run --rm --gpus '"device=1"' -it -e AzureStorageConnectionString --name $(IMGNAME) -v ~/depth:/depth -v ~/mesh:/mesh -v /root/OneDrive/_nft:/nft --entrypoint /bin/bash $(IMGAUTHOR)/$(IMGNAME):$(IMGTAG)
stop-console:
sudo nvidia-docker stop $(shell sudo docker ps -q --filter "name$=(IMGNAME)-console")
sudo docker container prune --force
git-pull:
git pull
rebuild: stop git-pull build start
restart: stop start