forked from DeepLabCut/DeepLabCut
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (36 loc) · 1018 Bytes
/
Makefile
File metadata and controls
42 lines (36 loc) · 1018 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
PROJECT_NAME=deeplabcut-work
JUPYTER_PORT=9000
TENSORBOARD_PORT=9001
IMAGE_NAME=$(PROJECT_NAME)-image
CONTAINER_NAME=$(PROJECT_NAME)-container
USER_ID=$(shell id -u)
GROUP_ID=$(shell id -g)
docker-build:
docker build \
-t $(IMAGE_NAME) \
--build-arg user_id=$(USER_ID) \
--build-arg group_id=$(GROUP_ID) \
-f docker/Dockerfile .
docker-build-no-cache:
docker build \
-t $(IMAGE_NAME) \
--build-arg user_id=$(USER_ID) \
--build-arg group_id=$(GROUP_ID) \
-f docker/Dockerfile --no-cache .
docker-run:
docker run -it --rm --runtime=nvidia \
--user ubuntu \
--name $(CONTAINER_NAME) \
-p $(JUPYTER_PORT):$(JUPYTER_PORT) \
-p $(TENSORBOARD_PORT):$(TENSORBOARD_PORT) \
-e DISPLAY=$(DISPLAY) \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
-v `pwd`:/work \
-v /mnt/:/mnt/ \
$(IMAGE_NAME) \
/bin/bash
jupyter:
jupyter lab --ip=0.0.0.0 --allow-root --port=$(JUPYTER_PORT) \
--NotebookApp.token='' \
--NotebookApp.terminado_settings='{"shell_command": ["/bin/bash"]}' \
--no-browser \