-
Notifications
You must be signed in to change notification settings - Fork 26
103 lines (88 loc) · 3.46 KB
/
Make_Subsystem_Dockers.yml
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
name: Update Mirror Image of LocalAI
on:
workflow_dispatch:
schedule:
- cron: '0 */4 * * *'
jobs:
push_cpu_to_hub:
name: Push LocalAI CPU to Docker Hub
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@master
with:
images: lunamidori5/midori_ai_subsystem_localai_cpu
- name: Make Ver Tags (tags, labels) for Docker
id: sha
uses: docker/metadata-action@master
with:
images: lunamidori5/midori_ai_subsystem_localai_cpu
tags: |
type=sha,enable=true,priority=100,prefix={{date 'YYYYMMDD-HHmmss' tz='Asia/Tokyo'}}-sha-,suffix=,format=short
- name: Build and push CPU LocalAI Docker image
uses: docker/build-push-action@master
with:
context: ./other_files/subsystem_docker_stuff/localai/
file: ./other_files/subsystem_docker_stuff/localai/localai-subsystem-dockerfile-cpu
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push CPU LocalAI Docker image
uses: docker/build-push-action@master
with:
context: ./other_files/subsystem_docker_stuff/localai/
file: ./other_files/subsystem_docker_stuff/localai/localai-subsystem-dockerfile-cpu
push: true
tags: ${{ steps.sha.outputs.tags }}
labels: ${{ steps.sha.outputs.labels }}
- name: Clean up Docker Cache
run: |
docker image prune -f
push_gpu_to_hub:
name: Push LocalAI GPU to Docker Hub
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@master
with:
images: lunamidori5/midori_ai_subsystem_localai_gpu
- name: Make Ver Tags (tags, labels) for Docker
id: sha
uses: docker/metadata-action@master
with:
images: lunamidori5/midori_ai_subsystem_localai_gpu
tags: |
type=sha,enable=true,priority=100,prefix={{date 'YYYYMMDD-HHmmss' tz='Asia/Tokyo'}}-sha-,suffix=,format=short
- name: Build and push GPU LocalAI Docker image
uses: docker/build-push-action@master
with:
context: ./other_files/subsystem_docker_stuff/localai/
file: ./other_files/subsystem_docker_stuff/localai/localai-subsystem-dockerfile-gpu
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push GPU LocalAI Docker image
uses: docker/build-push-action@master
with:
context: ./other_files/subsystem_docker_stuff/localai/
file: ./other_files/subsystem_docker_stuff/localai/localai-subsystem-dockerfile-gpu
push: true
tags: ${{ steps.sha.outputs.tags }}
labels: ${{ steps.sha.outputs.labels }}
- name: Clean up Docker Cache
run: |
docker image prune -f