-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (47 loc) · 1.15 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
# defaults
IMAGE_NAME := jveldboom/video-swear-jar
IMAGE_VERSION := latest
IMAGE_TAG := ${IMAGE_NAME}:${IMAGE_VERSION}
DIR := $(shell pwd)
# Docker
docker-build: # only builds image for current system arch
docker build -t ${IMAGE_TAG} .
docker-buildx:
docker buildx create --use
docker buildx build \
--platform linux/arm64/v8,linux/amd64 \
--push \
-t ${IMAGE_TAG} \
-t ${IMAGE_NAME}:${MAJOR_VERSION} \
.
docker-push:
docker push --all-tags ${IMAGE_NAME}
## Testing
test-clean:
docker run --rm \
-v ${DIR}/.whisper:/app/.whisper \
-v ${DIR}/examples:/data \
${IMAGE_TAG} \
clean -i /data/curious-george.mp4 -m tiny.en -l en
## Targets Used for Development
whisper:
docker run -it --rm \
-v ${DIR}:/app \
-v ${DIR}/.whisper:/app/.whisper \
${IMAGE_TAG} \
whisper ${VIDEO_FILE} \
--model ${MODEL} \
--language ${LANG} \
--output_format json \
--output_dir data
node:
docker run -it --rm \
-v ${DIR}:/app \
-v ${DIR}/.whisper:/app/.whisper \
${IMAGE_TAG} \
node /app/src/cut-video.js -t test -v test.mp4
bash:
docker run -it --rm \
-v ${DIR}:/data \
-v ${DIR}/.whisper:/app/.whisper \
${IMAGE_TAG} /bin/bash