forked from explosion/spacy-course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (38 loc) · 830 Bytes
/
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
SHELL := /bin/bash
APP_NAME = "spacy_course"
# import settings config
settingsfile=docker/config.env
ifneq ("$(wildcard $(settingsfile))","")
ifdef stt
settingsfile=$(stt)
endif
include $(settingsfile)
export $(shell sed 's/=.*//' $(settingsfile))
endif
build:
docker build \
--pull \
--tag $(APP_NAME) \
--file $(CURDIR)/docker/Dockerfile \
$(CURDIR)
run:
docker run -it --rm \
-v $(PWD):/host \
-p 8000:8000 \
-e PYTHONIOENCODING="utf-8" \
$(APP_NAME) \
$(SHELL)
gatsby-dev:
docker run -it --rm \
-v $(PWD):/host \
-p 8000:8000 \
-e PYTHONIOENCODING="utf-8" \
$(APP_NAME) \
$(SHELL) -c "npm run dev"
pytest:
docker run -it --rm \
-v $(PWD):/host \
-p 8000:8000 \
-e PYTHONIOENCODING="utf-8" \
$(APP_NAME) \
$(SHELL) -c "python -m pytest __tests__"