forked from VOICEVOX/voicevox_engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
125 lines (106 loc) · 4.43 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
CMD=
NOCACHE=
ARGS:=
ifeq ($(NOCACHE),1)
ARGS:=$(ARGS) --no-cache
endif
# Ubuntu 20.04
.PHONY: build-linux-docker-ubuntu20.04
build-linux-docker-ubuntu20.04:
docker buildx build . \
-t sharevox/sharevox_engine:cpu-ubuntu20.04-latest \
--target runtime-env \
--progress plain \
--build-arg BASE_IMAGE=ubuntu:20.04 \
--build-arg BASE_RUNTIME_IMAGE=ubuntu:20.04 \
--build-arg ONNXRUNTIME_URL=https://github.com/microsoft/onnxruntime/releases/download/v1.12.1/onnxruntime-linux-x64-1.12.1.tgz \
--build-arg VOICEVOX_CORE_LIBRARY_NAME=libcore_cpu_x64.so $(ARGS)
.PHONY: run-linux-docker-ubuntu20.04
run-linux-docker-ubuntu20.04:
docker run --rm -it \
-p '127.0.0.1:50021:50021' $(ARGS) \
sharevox/sharevox_engine:cpu-ubuntu20.04-latest $(CMD)
.PHONY: build-linux-docker-nvidia-ubuntu20.04
build-linux-docker-nvidia-ubuntu20.04:
docker buildx build . \
-t sharevox/sharevox_engine:nvidia-ubuntu20.04-latest \
--target runtime-nvidia-env \
--progress plain \
--build-arg BASE_IMAGE=ubuntu:20.04 \
--build-arg BASE_RUNTIME_IMAGE=nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04 \
--build-arg ONNXRUNTIME_URL=https://github.com/microsoft/onnxruntime/releases/download/v1.12.1/onnxruntime-linux-x64-gpu-1.12.1.tgz \
--build-arg VOICEVOX_CORE_LIBRARY_NAME=libcore_gpu_x64_nvidia.so $(ARGS)
.PHONY: run-linux-docker-nvidia-ubuntu20.04
run-linux-docker-nvidia-ubuntu20.04:
docker run --rm -it \
--gpus all \
-p '127.0.0.1:50021:50021' $(ARGS) \
sharevox/sharevox_engine:nvidia-ubuntu20.04-latest $(CMD)
# Ubuntu 18.04
.PHONY: build-linux-docker-ubuntu18.04
build-linux-docker-ubuntu18.04:
docker buildx build . \
-t sharevox/sharevox_engine:cpu-ubuntu18.04-latest \
--target runtime-env \
--progress plain \
--build-arg BASE_IMAGE=ubuntu:18.04 \
--build-arg BASE_RUNTIME_IMAGE=ubuntu:18.04 \
--build-arg ONNXRUNTIME_URL=https://github.com/microsoft/onnxruntime/releases/download/v1.12.1/onnxruntime-linux-x64-1.12.1.tgz \
--build-arg VOICEVOX_CORE_LIBRARY_NAME=libcore_cpu_x64.so $(ARGS)
.PHONY: run-linux-docker-ubuntu18.04
run-linux-docker-ubuntu18.04:
docker run --rm -it \
-p '127.0.0.1:50021:50021' $(ARGS) \
sharevox/sharevox_engine:cpu-ubuntu18.04-latest $(CMD)
.PHONY: build-linux-docker-nvidia-ubuntu18.04
build-linux-docker-nvidia-ubuntu18.04:
docker buildx build . \
-t sharevox/sharevox_engine:nvidia-ubuntu18.04-latest \
--target runtime-nvidia-env \
--progress plain \
--build-arg BASE_IMAGE=ubuntu:18.04 \
--build-arg BASE_RUNTIME_IMAGE=nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu18.04 \
--build-arg ONNXRUNTIME_URL=https://github.com/microsoft/onnxruntime/releases/download/v1.12.1/onnxruntime-linux-x64-gpu-1.12.1.tgz \
--build-arg VOICEVOX_CORE_LIBRARY_NAME=libcore_gpu_x64_nvidia.so $(ARGS)
.PHONY: run-linux-docker-nvidia-ubuntu18.04
run-linux-docker-nvidia-ubuntu18.04:
docker run --rm -it \
--gpus all \
-p '127.0.0.1:50021:50021' $(ARGS) \
sharevox/sharevox_engine:nvidia-ubuntu18.04-latest $(CMD)
# VOICEVOX Core env for test
.PHONY: build-linux-docker-download-core-env-ubuntu18.04
build-linux-docker-download-core-env-ubuntu18.04:
docker buildx build . \
-t sharevox/sharevox_engine:download-core-env-ubuntu18.04 \
--target download-core-env \
--progress plain \
--build-arg BASE_IMAGE=ubuntu:18.04 $(ARGS)
.PHONY: run-linux-docker-download-core-env-ubuntu18.04
run-linux-docker-download-core-env-ubuntu18.04:
docker run --rm -it $(ARGS) \
sharevox/sharevox_engine:download-core-env-ubuntu18.04 $(CMD)
# ONNX Runtime env for test
.PHONY: build-linux-docker-download-onnxruntime-env-ubuntu18.04
build-linux-docker-download-onnxruntime-env-ubuntu18.04:
docker buildx build . \
-t sharevox/sharevox_engine:download-onnxruntime-env-ubuntu18.04 \
--target download-onnxruntime-env \
--progress plain \
--build-arg BASE_IMAGE=ubuntu:18.04 $(ARGS)
.PHONY: run-linux-docker-download-onnxruntime-env-ubuntu18.04
run-linux-docker-download-onnxruntime-env-ubuntu18.04:
docker run --rm -it $(ARGS) \
sharevox/sharevox_engine:download-onnxruntime-env-ubuntu18.04 $(CMD)
# Python env for test
.PHONY: build-linux-docker-compile-python-env
build-linux-docker-compile-python-env:
docker buildx build . \
-t sharevox/sharevox_engine:compile-python-env \
--target compile-python-env \
--progress plain \
--build-arg BASE_IMAGE=ubuntu:20.04 $(ARGS)
.PHONY: run-linux-docker-compile-python-env
run-linux-docker-compile-python-env:
docker run --rm -it $(ARGS) \
sharevox/sharevox_engine:compile-python-env $(CMD)