-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.mk
37 lines (28 loc) · 1.05 KB
/
commands.mk
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
.PHONY: all clean docker-build
all: docker-run-jupyter
clean:
find . -name "*.pyc" | xargs rm -f && \
find . -name "__pycache__" | xargs rm -rf
docker-build:
docker build \
--build-arg FROM_IMAGE_NAME=${DOCKER_BASE_IMG} \
--build-arg TF_PACKAGE=${TF_PACKAGE} \
--build-arg TF_PACKAGE_VERSION=${TF_PACKAGE_VERSION} \
--build-arg TF_MODEL_BRANCH=${TF_MODEL_BRANCH} \
--build-arg TORCH_VERSION=${TORCH_VERSION} \
--build-arg TORCHVISION_VERSION=${TORCHVISION_VERSION} \
--build-arg FASTAI_VERSION=${FASTAI_VERSION} \
-t ${DOCKER_IMAGE} .
docker-run-bash: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} bash
docker-run-jupyter: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} \
bash -c "jupyter lab --port=8888 --ip=0.0.0.0 --allow-root \
--NotebookApp.token='' --notebook-dir=${MOUNT_WORKSPACE_TO} --no-browser"
docker-run-default: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE}
docker-run-cmd: docker-build
docker run ${DOCKER_OPTS} ${DOCKER_IMAGE} \
bash -c "${CMD}"
docker-exec-bash:
docker exec -it ${PROJECT} bash