-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 890 Bytes
/
Makefile
File metadata and controls
35 lines (24 loc) · 890 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
.PHONY: build push
IMAGE_NAME = odk-ai
TAG = latest
#BUILD_OPTS = --no-cache
BUILD_OPTS =
build:
@if [ -z "$$GH_TOKEN" ]; then \
echo "ERROR: GH_TOKEN environment variable is not set"; \
echo "Please set it with: export GH_TOKEN=your_github_token"; \
echo "You can create a token at https://github.com/settings/tokens"; \
exit 1; \
fi
docker build $(BUILD_OPTS) --build-arg GH_TOKEN=$(GH_TOKEN) -t cmungall/$(IMAGE_NAME):$(TAG) .
push: build
docker tag $(IMAGE_NAME):$(TAG) cmungall/$(IMAGE_NAME):$(TAG)
docker push cmungall/$(IMAGE_NAME):$(TAG)
run:
docker run -it --rm $(IMAGE_NAME):$(TAG)
test:
cd scratch && docker run -v $PWD:/work -e ANTHROPIC_API_KEY=$$ANTHROPIC_API_KEY -it --rm odk-ai:latest bash
# e.g. test-repos/obophenotype/uberon
# git clone https://github.com/obophenotype/uberon
test-repos/%:
cd test-repos && git clone https://github.com/$*