This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
47 lines (40 loc) · 1.71 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
PLATFORM = third_party/brezel
# Makes sure the Research Platform gets pulled as a submodule into $(PLATFORM)
# Installs hooks to automate submodule updates on pull
# WARNING: uncommitted modifications in $(PLATFORM) will be lost!
.PHONY: init
init:
git submodule sync --recursive
git submodule update --init --recursive --force
git config core.hooksPath $(PLATFORM)/scripts/githooks/project_repo
# Upgrade brezel
# Running `make upgrade` will fast-forward folder third_party/brezel into the
# current master commit of the brezel repository.
# You usually need to run this rule if you want to use new features from the Research Platform.
# WARNING: running this command will create a commit in the present project.
# WARNING: uncommitted modifications in $(PLATFORM) will be lost!
.PHONY: upgrade
upgrade:
git submodule foreach git fetch origin
git submodule foreach git checkout origin/master --force
git commit $(PLATFORM) --message 'RESEARCH PLATFORM: upgrade submodule'
# Call rule from brezel's Makefile
# If the rule is not defined in the present Makefile, we forward it the the Makefile
# located in $(PLATFORM).
# Typical usage: build, run, run-list
.PHONY: phony_explicit
phony_explicit:
%: phony_explicit
@$(MAKE) --no-print-directory --makefile=$(PLATFORM)/Makefile $@ ROOT=$(PWD)/$(PLATFORM)
##
# Makefile rules specific to this project
##
# Path to the bazel sandbox
BAZELBIN = $(shell bazel info bazel-bin 2>/dev/null)
bazel-run:
@ln -s $(BAZELBIN)/run $@
.PHONY: tensorboard
tensorboard:
@echo In the container run \t tensorboard --logdir /results/CHOOSE_RESULTS_DIR --bind_all
@echo Open http://localhost:6006
@docker run -it --rm -u `id -u`:`id -g` -v `pwd`/results:/results -p 6006:6006 tensorflow/tensorflow:latest-gpu