-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
86 lines (68 loc) · 2.55 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
GO ?= go
.DEFAULT_GOAL := default
version := v0.0.1
VS_PYTORCH_VERSION := v0.0.1
.PHONY: tidy
tidy: ## go mod tidy
${GO} mod tidy
.PHONY: server
server: ## build binary file
${GO} build -o server ./server
.PHONY: worker
worker: ## build binary file
${GO} build -o worker ./worker
.PHONY: test
test: tidy ## go test
${GO} test ./...
.PHONY: lint ## pip install pre-commit
lint:
golangci-lint run
pre-commit install
pre-commit run --all-files
.PHONY: all
all:
docker buildx build -f ./deploy/server.dockerfile -t lychee0/finalrip-server .
docker buildx build -f ./deploy/worker-cut.dockerfile -t lychee0/finalrip-worker-cut .
docker buildx build -f ./deploy/worker-merge.dockerfile -t lychee0/finalrip-worker-merge .
.PHONY: pt
pt:
docker buildx build -f ./deploy/worker-encode.dockerfile -t lychee0/finalrip-worker-encode --build-arg BASE_CONTAINER_TAG=cuda-${VS_PYTORCH_VERSION} .
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:latest
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:dev
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:cuda-dev
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:cuda-${version}
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:cuda
.PHONY: pt-release-dev
pt-release-dev:
docker login
docker push lychee0/finalrip-worker-encode:dev
docker push lychee0/finalrip-worker-encode:cuda-dev
.PHONY: pt-release
pt-release:
docker login
docker push lychee0/finalrip-worker-encode:latest
docker push lychee0/finalrip-worker-encode:cuda
docker push lychee0/finalrip-worker-encode:cuda-${version}
.PHONY: pt-rocm
pt-rocm:
docker buildx build -f ./deploy/worker-encode.dockerfile -t lychee0/finalrip-worker-encode --build-arg BASE_CONTAINER_TAG=rocm-${VS_PYTORCH_VERSION} .
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:rocm-dev
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:rocm-${version}
docker tag lychee0/finalrip-worker-encode lychee0/finalrip-worker-encode:rocm
.PHONY: pt-rocm-release-dev
pt-rocm-release-dev:
docker login
docker push lychee0/finalrip-worker-encode:rocm-dev
.PHONY: pt-rocm-release
pt-rocm-release:
docker login
docker push lychee0/finalrip-worker-encode:rocm
docker push lychee0/finalrip-worker-encode:rocm-${version}
.PHONY: release-dev
release-dev: pt pt-release-dev
.PHONY: release
release: pt pt-release
.PHONY: release-rocm-dev
release-rocm-dev: pt-rocm pt-rocm-release-dev
.PHONY: release-rocm
release-rocm: pt-rocm pt-rocm-release