-
Notifications
You must be signed in to change notification settings - Fork 3
195 lines (167 loc) · 7.79 KB
/
spacefx-images-build.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
194
195
name: spacefx-images-build-publish
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-spacefx-base-image-amd64:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: microsoft/azure-orbital-space-sdk-github-actions/composite-actions/initialize@main
with:
GIT_HUB_USER_NAME: ${{ secrets.GIT_HUB_USER_NAME }}
GIT_HUB_USER_TOKEN: ${{ secrets.GIT_HUB_USER_TOKEN }}
SETUP_REPO_URL: ${{ secrets.SETUP_REPO_URL }}
- uses: microsoft/azure-orbital-space-sdk-github-actions/composite-actions/run-build-container-image@main
with:
docker-file: /var/spacedev/build/spacesdk-base/Dockerfile.spacesdk-base
architecture: amd64
repo-dir: ${{ github.workspace }}
app-name: spacesdk-base
annotation-config: azure-orbital-space-sdk-setup.yaml
build-spacefx-base-image-arm64:
runs-on: spacesdk-ubuntu-2204LTS-arm64
permissions:
contents: read
packages: write
steps:
- uses: microsoft/azure-orbital-space-sdk-github-actions/composite-actions/initialize@main
with:
GIT_HUB_USER_NAME: ${{ secrets.GIT_HUB_USER_NAME }}
GIT_HUB_USER_TOKEN: ${{ secrets.GIT_HUB_USER_TOKEN }}
SETUP_REPO_URL: ${{ secrets.SETUP_REPO_URL }}
- uses: microsoft/azure-orbital-space-sdk-github-actions/composite-actions/run-build-container-image@main
with:
docker-file: ./build/spacesdk-base/Dockerfile.spacesdk-base
architecture: arm64
repo-dir: ${{ github.workspace }}
app-name: spacesdk-base
annotation-config: azure-orbital-space-sdk-setup.yaml
build-python-images-amd64:
runs-on: ubuntu-latest
needs: build-spacefx-base-image-amd64
permissions:
contents: read
packages: write
steps:
- uses: microsoft/azure-orbital-space-sdk-github-actions/composite-actions/initialize@main
with:
GIT_HUB_USER_NAME: ${{ secrets.GIT_HUB_USER_NAME }}
GIT_HUB_USER_TOKEN: ${{ secrets.GIT_HUB_USER_TOKEN }}
SETUP_REPO_URL: ${{ secrets.SETUP_REPO_URL }}
- name: Build Python-Base and SpaceSDK-Base-Python Container images
shell: bash
run: |
echo "Sourcing environment variables..."
source ./env/spacefx.env
# Python-Base and SpaceSDK-Base-Python Container image build
PYTHON_VERSIONS=("3.10" "3.9" "3.8")
for i in "${!PYTHON_VERSIONS[@]}"; do
PYTHON_VERSION=${PYTHON_VERSIONS[i]}
PYTHON_VERSION_TAG_CHANNEL=${PYTHON_VERSION}
[[ "${SPACEFX_CHANNEL}" != "stable" ]] && PYTHON_VERSION_TAG_CHANNEL="${PYTHON_VERSION_TAG_CHANNEL}-${SPACEFX_CHANNEL}"
# Build and push Python-Base images. This is an intermediate layer with only Python (built from source)
/var/spacedev/build/build_containerImage.sh \
--dockerfile /var/spacedev/build/python/Dockerfile.python-base \
--image-tag ${PYTHON_VERSION} \
--repo-dir ${PWD} \
--no-spacefx-dev \
--app-name python-base \
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
--annotation-config azure-orbital-space-sdk-setup.yaml
# Build spacesdk-python-base, which is a combination of spacesdk-base and python-base
/var/spacedev/build/build_containerImage.sh \
--dockerfile /var/spacedev/build/python/Dockerfile.python-spacesdk-base \
--image-tag 0.11.0_${PYTHON_VERSION} \
--repo-dir ${PWD} \
--no-spacefx-dev \
--app-name spacesdk-base-python \
--build-arg PYTHON_VERSION="${PYTHON_VERSION_TAG_CHANNEL}" \
--build-arg SDK_VERSION="${SPACEFX_VERSION_CHANNEL_TAG}" \
--annotation-config azure-orbital-space-sdk-setup.yaml
done
build-python-images-arm64:
runs-on: spacesdk-ubuntu-2204LTS-arm64
needs: build-spacefx-base-image-arm64
permissions:
contents: read
packages: write
steps:
- uses: microsoft/azure-orbital-space-sdk-github-actions/composite-actions/initialize@main
with:
GIT_HUB_USER_NAME: ${{ secrets.GIT_HUB_USER_NAME }}
GIT_HUB_USER_TOKEN: ${{ secrets.GIT_HUB_USER_TOKEN }}
SETUP_REPO_URL: ${{ secrets.SETUP_REPO_URL }}
- name: Build Python-Base and SpaceSDK-Base-Python Container images
shell: bash
run: |
echo "Sourcing environment variables..."
source ./env/spacefx.env
# Python-Base and SpaceSDK-Base-Python Container image build
PYTHON_VERSIONS=("3.10" "3.9" "3.8")
for i in "${!PYTHON_VERSIONS[@]}"; do
PYTHON_VERSION=${PYTHON_VERSIONS[i]}
PYTHON_VERSION_TAG_CHANNEL=${PYTHON_VERSION}
[[ "${SPACEFX_CHANNEL}" != "stable" ]] && PYTHON_VERSION_TAG_CHANNEL="${PYTHON_VERSION_TAG_CHANNEL}-${SPACEFX_CHANNEL}"
# Build and push Python-Base images. This is an intermediate layer with only Python (built from source)
/var/spacedev/build/build_containerImage.sh \
--dockerfile /var/spacedev/build/python/Dockerfile.python-base \
--image-tag ${PYTHON_VERSION} \
--repo-dir ${PWD} \
--no-spacefx-dev \
--app-name python-base \
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
--annotation-config azure-orbital-space-sdk-setup.yaml
# Build spacesdk-python-base, which is a combination of spacesdk-base and python-base
/var/spacedev/build/build_containerImage.sh \
--dockerfile /var/spacedev/build/python/Dockerfile.python-spacesdk-base \
--image-tag 0.11.0_${PYTHON_VERSION} \
--repo-dir ${PWD} \
--no-spacefx-dev \
--app-name spacesdk-base-python \
--build-arg PYTHON_VERSION="${PYTHON_VERSION_TAG_CHANNEL}" \
--build-arg SDK_VERSION="${SPACEFX_VERSION_CHANNEL_TAG}" \
--annotation-config azure-orbital-space-sdk-setup.yaml
done
build-space-sdk-jetson-deviceyquery-arm64:
runs-on: spacesdk-ubuntu-2204LTS-arm64
needs: build-python-images-arm64
permissions:
contents: read
packages: write
steps:
- uses: microsoft/azure-orbital-space-sdk-github-actions/composite-actions/initialize@main
with:
GIT_HUB_USER_NAME: ${{ secrets.GIT_HUB_USER_NAME }}
GIT_HUB_USER_TOKEN: ${{ secrets.GIT_HUB_USER_TOKEN }}
SETUP_REPO_URL: ${{ secrets.SETUP_REPO_URL }}
- name: Build Jetson DeviceQuery Container images
shell: bash
run: |
echo "Sourcing environment variables..."
source ./env/spacefx.env
# Build the SpaceSDK-Jetson-DeviceQuery Versions
CUDA_VERSIONS=("11.4" "12.2")
for i in "${!CUDA_VERSIONS[@]}"; do
CUDA_VERSION=${CUDA_VERSIONS[i]}
/var/spacedev/build/build_containerImage.sh \
--dockerfile /var/spacedev/build/gpu/jetson/Dockerfile.deviceQuery \
--build-arg CUDA_VERSION="${CUDA_VERSION}" \
--image-tag "cuda-${CUDA_VERSION}" \
--repo-dir ${PWD} \
--no-spacefx-dev \
--app-name spacesdk-jetson-devicequery \
--annotation-config azure-orbital-space-sdk-setup.yaml
/var/spacedev/build/build_containerImage.sh \
--dockerfile /var/spacedev/build/gpu/jetson/Dockerfile.deviceQuery.dev \
--build-arg CUDA_VERSION="${CUDA_VERSION}" \
--image-tag "cuda-${CUDA_VERSION}-dev" \
--repo-dir ${PWD} \
--no-spacefx-dev \
--app-name spacesdk-jetson-devicequery \
--annotation-config azure-orbital-space-sdk-setup.yaml
done