-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
86 lines (74 loc) · 2.99 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
SCRAPERNAME=scraper
PRIMROSENAME=primrose
CONTAINERLOC=gcr.io/$(PROJECT)/
JOBNAME=custom_container_job_$(shell date +%Y%m%d_%H%M%S)
REGION=$(GCP_REGION)
build-scrape:
docker build -f art_snob_scrape/Dockerfile -t $(SCRAPERNAME) .
docker tag $(SCRAPERNAME) $(CONTAINERLOC)$(SCRAPERNAME)
docker push $(CONTAINERLOC)$(SCRAPERNAME)
build-primrose:
docker build -f art_snob_primrose/Dockerfile -t $(PRIMROSENAME) .
docker tag $(PRIMROSENAME) $(CONTAINERLOC)$(PRIMROSENAME)
docker push $(CONTAINERLOC)$(PRIMROSENAME)
submit-embed-job:
gcloud ai-platform jobs submit training $(JOBNAME) \
--master-machine-type n1-standard-32 \
--master-image-uri $(CONTAINERLOC)$(PRIMROSENAME) \
--region $(REGION) \
--scale-tier CUSTOM \
-- python run_primrose.py --config_loc config/image_embeddings_etl.yaml --use_stackdriver_logging False --project $(PROJECT)
submit-random-job:
gcloud ai-platform jobs submit training $(JOBNAME) \
--master-machine-type n1-standard-8 \
--master-image-uri $(CONTAINERLOC)$(PRIMROSENAME) \
--region $(REGION) \
--scale-tier CUSTOM \
-- python run_primrose.py --config_loc config/create_random_selections.yaml --use_stackdriver_logging False --project $(PROJECT)
submit-reverse-index-job:
gcloud ai-platform jobs submit training $(JOBNAME) \
--master-machine-type n1-standard-8 \
--master-image-uri $(CONTAINERLOC)$(PRIMROSENAME) \
--region $(REGION) \
--scale-tier CUSTOM \
-- python run_primrose.py --config_loc config/create_tags_reverse_index.yaml --use_stackdriver_logging False --project $(PROJECT)
submit-neighbor-job:
gcloud ai-platform jobs submit training $(JOBNAME) \
--master-machine-type n1-standard-8 \
--master-image-uri $(CONTAINERLOC)$(PRIMROSENAME) \
--region $(REGION) \
--scale-tier CUSTOM \
-- python run_primrose.py --config_loc config/image_embedding_pca_index.yaml --use_stackdriver_logging False --project $(PROJECT)
submit-object-job:
gcloud ai-platform jobs submit training $(JOBNAME) \
--master-machine-type n1-standard-8 \
--master-image-uri $(CONTAINERLOC)$(PRIMROSENAME) \
--region $(REGION) \
--scale-tier CUSTOM \
-- python run_primrose.py --config_loc config/image_embeddings_get_objects.yaml --use_stackdriver_logging False --project $(PROJECT)
submit-scrape-job:
gcloud ai-platform jobs submit training $(JOBNAME) \
--master-machine-type n1-standard-4 \
--master-image-uri gcr.io/$(PROJECT)/scraper \
--region $(REGION) \
--scale-tier CUSTOM
create-neo4j-db:
docker run \
--name testneo4j \
-p7474:7474 -p7687:7687 \
-d \
-v $(HOME)/neo4j/data:/data \
-v $(HOME)/neo4j/logs:/logs \
-v $(HOME)/neo4j/import:/var/lib/neo4j/import \
-v $(HOME)/neo4j/plugins:/plugins \
--env NEO4J_AUTH=neo4j/test \
neo4j:latest
deploy-frontend:
rm -rf ./build_deploy/build
cd art_snob_frontend ; npm run build
cp -r art_snob_frontend/build ./build_deploy/build/
cd build_deploy ; gcloud app deploy
deploy-backend:
cd art_snob_api ; gcloud app deploy
deploy-image-api:
cd image_model_api ; gcloud beta app deploy --no-cache