-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
51 lines (45 loc) · 1.65 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
48
49
50
51
IMAGE_NAME = $(USER)-literature-search
build:
# Build and tag the image prefixed by user to avoid conflicts on shared machines
docker build --no-cache -t $(IMAGE_NAME) .
push:
# Tag and push our current docker build to dockerhub
docker tag $(USER)-literature-search:latest brcachallenge/literature-search:latest
docker push brcachallenge/literature-search:latest
debug:
# Run the docker mapping local directory into app for development
docker run --rm -it \
--name $(IMAGE_NAME) \
--user=`id -u`:`id -g` \
-v `readlink -f ~/pubConf`:/.pubConf:ro \
-v `readlink -f ~/data/literature-search/references`:/references \
-v `readlink -f ~/data/literature-search/crawl`:/crawl \
-v `pwd`:/app \
--entrypoint /bin/bash \
$(IMAGE_NAME)
update-pubmunch:
# Fetch upstream master and merge into our fork
cd ~/pubMunch && \
git fetch upstream && \
git checkout master && \
git merge upstream/master && \
git checkout brca && \
git rebase master
references:
# Run image on command line to download all references
docker run --rm -it \
--name $(IMAGE_NAME) \
--user=`id -u`:`id -g` \
-v `readlink -f ~/.pubConf`:/.pubConf:ro \
-v `readlink -f ~/data/literature-search/references`:/references \
-v `readlink -f ~/data/literature-search/crawl`:/crawl \
$(IMAGE_NAME) references
crawl-one:
# Run image on command line fully automated generate literature.json for one paper
docker run --rm -it \
--name $(IMAGE_NAME) \
--user=`id -u`:`id -g` \
-v `readlink -f ~/pubConf`:/.pubConf:ro \
-v `readlink -f ~/data/literature-search/references`:/references \
-v `readlink -f ~/data/literature-search/crawl`:/crawl \
$(IMAGE_NAME) --pmid 9042909 crawl