-
Notifications
You must be signed in to change notification settings - Fork 9
193 lines (185 loc) · 7.45 KB
/
main.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: Docker Images CI
on:
schedule:
- cron: "0 2 * * 1-5"
workflow_dispatch:
jobs:
build-tour-docker:
runs-on: ubuntu-latest
strategy:
matrix:
config:
# - {
# ros2_distro: "humble",
# base_image: "ubuntu:22.04",
# base_image_label: "ubuntu22.04",
# }
- {
ros2_distro: "iron",
base_image: "ubuntu:22.04",
base_image_label: "ubuntu22.04",
}
# - {
# ros2_distro: "humble",
# base_image: "nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04",
# base_image_label: "cuda.11.7.1-cudnn8",
# }
- {
ros2_distro: "iron",
base_image: "nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04",
base_image_label: "cuda.11.7.1-cudnn8",
}
steps:
- name: Info
run: |
echo "Event type: ${{github.event_name}}"
- name: Change docker to experimental mode
run: |
sudo rm -rf /etc/docker/daemon.json
echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json
- name: Restart docker daemon
run: sudo systemctl restart docker
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the tour core Docker image
working-directory: docker_stuff/docker_tourCore2/
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Building development tour core image"
sudo docker build --build-arg base_img=${{matrix.config.base_image}} --build-arg ros_distro=${{matrix.config.ros2_distro}} -t elandini84/r1images:tourCore2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_devel .
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Building stable tour core image"
sudo docker build --build-arg base_img=${{matrix.config.base_image}} --build-arg ros_distro=${{matrix.config.ros2_distro}} -t elandini84/r1images:tourCore2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_stable .
else
echo "Failure!"
exit 1
fi
- name: Push tourCore2 image
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Pushing tourCore2 development image"
docker push elandini84/r1images:tourCore2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_devel
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Pushing tourCore2 stable image"
docker push elandini84/r1images:tourCore2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_stable
else
echo "Failure!"
exit 1
fi
build-r1OpenPose:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Info
run: |
echo "Event type: ${{github.event_name}}"
- name: Change docker to experimental mode
run: |
sudo rm -rf /etc/docker/daemon.json
echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json
- name: Restart docker daemon
run: sudo systemctl restart docker
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the openPose Docker image
working-directory: docker_stuff/docker_openPose/
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Building development tour openPose image"
sudo docker build --build-arg ros_distro=${{steps.extract_branch.outputs.branch}} --tag elandini84/r1images:r1OpenPose_devel .
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Building stable tour openPose image"
sudo docker build --build-arg ros_distro=${{steps.extract_branch.outputs.branch}} --tag elandini84/r1images:r1OpenPose_stable .
else
echo "Failure!"
exit 1
fi
- name: Push r1OpenPose image
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Pushing r1OpenPose development image"
docker push elandini84/r1images:r1OpenPose_devel
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Pushing r1OpenPose stable image"
docker push elandini84/r1images:r1OpenPose_stable
else
echo "Failure!"
exit 1
fi
build-tour-docker-sim:
runs-on: ubuntu-latest
strategy:
matrix:
config:
# - {
# ros2_distro: "humble",
# base_image: "ubuntu:22.04",
# base_image_label: "ubuntu22.04",
# }
- {
ros2_distro: "iron",
base_image: "ubuntu:22.04",
base_image_label: "ubuntu22.04",
}
# - {
# ros2_distro: "humble",
# base_image: "nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04",
# base_image_label: "cuda.11.7.1-cudnn8",
# }
- {
ros2_distro: "iron",
base_image: "nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04",
base_image_label: "cuda.11.7.1-cudnn8",
}
steps:
- name: Info
run: |
echo "Event type: ${{github.event_name}}"
- name: Change docker to experimental mode
run: |
sudo rm -rf /etc/docker/daemon.json
echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json
- name: Restart docker daemon
run: sudo systemctl restart docker
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the tour core Docker image for simulation
working-directory: docker_stuff/docker_sim2/
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Building development tour core image"
sudo docker build --build-arg base_img=${{matrix.config.base_image}} --build-arg ros_distro=${{matrix.config.ros2_distro}} -t elandini84/r1images:tourSim2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_devel .
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Building stable tour core image"
sudo docker build --build-arg base_img=${{matrix.config.base_image}} --build-arg ros_distro=${{matrix.config.ros2_distro}} -t elandini84/r1images:tourSim2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_stable .
else
echo "Failure!"
exit 1
fi
- name: Push tourSim2 image
run: |
if [ ${{ github.event_name }} == 'schedule' ]; then
echo "Pushing tourCore2 development image"
docker push elandini84/r1images:tourSim2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_devel
elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
echo "Pushing tourCore2 stable image"
docker push elandini84/r1images:tourSim2_${{matrix.config.base_image_label}}_${{matrix.config.ros2_distro}}_stable
else
echo "Failure!"
exit 1
fi