1111 - " /docker/Dockerfile.cpu"
1212 - " /docker/Dockerfile.amd"
1313 - " /docker/Dockerfile.intel"
14+ - " /docker/Dockerfile.nogil"
1415 workflow_dispatch :
1516 inputs :
1617 cpu :
4647 strategy :
4748 matrix :
4849 gcc : ["", "14"]
50+ disable-gil : [false, true]
4951
5052 steps :
5153 - name : Checkout devito
@@ -66,14 +68,28 @@ jobs:
6668 username : ${{ secrets.DOCKER_USERNAME }}
6769 password : ${{ secrets.DOCKER_PASSWORD }}
6870
71+ - name : cleanup
72+ run : docker system prune -a -f
73+
74+ - name : Build free-threaded base image
75+ uses : docker/build-push-action@v6
76+ if : ${{ matrix.disable-gil }}
77+ with :
78+ context : .
79+ file : " ./docker/Dockerfile.nogil"
80+ tags : " ubuntu-nogil"
81+
6982 - name : GCC image
7083 uses : docker/build-push-action@v6
7184 with :
7285 context : .
7386 file : " ./docker/Dockerfile.cpu"
7487 push : true
75- build-args : " gcc=${{ matrix.gcc }}"
76- tags : " devitocodes/bases:cpu-gcc${{ matrix.gcc }}"
88+ build-args : |
89+ gcc=${{ matrix.gcc }}
90+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
91+ tags : " devitocodes/bases:cpu-gcc${{ matrix.gcc }}${{ matrix.disable-gil && '-nogil' || '' }}"
92+
7793
7894 # ######################################################
7995 # ############# Intel OneApi CPU #######################
@@ -85,6 +101,10 @@ jobs:
85101 env :
86102 DOCKER_BUILDKIT : " 1"
87103
104+ strategy :
105+ matrix :
106+ disable-gil : [false, true]
107+
88108 steps :
89109 - name : Checkout devito
90110 uses : actions/checkout@v4
@@ -103,15 +123,29 @@ jobs:
103123 with :
104124 username : ${{ secrets.DOCKER_USERNAME }}
105125 password : ${{ secrets.DOCKER_PASSWORD }}
126+
127+ - name : cleanup
128+ run : docker system prune -a -f
129+
130+ - name : Build free-threaded base image
131+ uses : docker/build-push-action@v6
132+ if : ${{ matrix.disable-gil }}
133+ with :
134+ context : .
135+ file : " ./docker/Dockerfile.nogil"
136+ tags : " ubuntu-nogil"
137+
106138 - name : ICX image
107139 uses : docker/build-push-action@v6
108140 with :
109141 context : .
110142 file : " ./docker/Dockerfile.intel"
111143 push : true
112144 target : " icx"
113- build-args : " arch=icx"
114- tags : " devitocodes/bases:cpu-icx"
145+ build-args : |
146+ arch=icx
147+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
148+ tags : " devitocodes/bases:cpu-icx${{ matrix.disable-gil && '-nogil' || '' }}"
115149
116150 - name : SYCL CPU image
117151 uses : docker/build-push-action@v6
@@ -120,8 +154,10 @@ jobs:
120154 file : " ./docker/Dockerfile.intel"
121155 push : true
122156 target : " cpu-sycl"
123- build-args : " arch=cpu-sycl"
124- tags : " devitocodes/bases:cpu-sycl"
157+ build-args : |
158+ arch=cpu-sycl
159+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
160+ tags : " devitocodes/bases:cpu-sycl${{ matrix.disable-gil && '-nogil' || '' }}"
125161
126162 - name : SYCL GPU image
127163 uses : docker/build-push-action@v6
@@ -130,8 +166,10 @@ jobs:
130166 file : " ./docker/Dockerfile.intel"
131167 push : true
132168 target : " gpu-sycl"
133- build-args : " arch=gpu-sycl"
134- tags : " devitocodes/bases:gpu-sycl"
169+ build-args : |
170+ arch=gpu-sycl
171+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
172+ tags : " devitocodes/bases:gpu-sycl${{ matrix.disable-gil && '-nogil' || '' }}"
135173
136174 # ######################################################
137175 # ################## Nvidia nvhpc ######################
@@ -143,6 +181,10 @@ jobs:
143181 env :
144182 DOCKER_BUILDKIT : " 1"
145183
184+ strategy :
185+ matrix :
186+ disable-gil : [false, true]
187+
146188 steps :
147189 - name : Checkout devito
148190 uses : actions/checkout@v4
@@ -162,17 +204,30 @@ jobs:
162204 username : ${{ secrets.DOCKER_USERNAME }}
163205 password : ${{ secrets.DOCKER_PASSWORD }}
164206
207+ - name : cleanup
208+ run : docker system prune -a -f
209+
210+ - name : Build free-threaded base image
211+ uses : docker/build-push-action@v6
212+ if : ${{ matrix.disable-gil }}
213+ with :
214+ context : .
215+ file : " ./docker/Dockerfile.nogil"
216+ tags : " ubuntu-nogil"
217+
165218 - name : NVC image
166219 uses : docker/build-push-action@v6
167220 with :
168221 context : .
169222 file : " ./docker/Dockerfile.nvidia"
170223 push : true
171224 target : " nvc"
172- build-args : " arch=nvc"
225+ build-args : |
226+ arch=nvc
227+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
173228 # Label (not tag) with runner name for traceability without changing image tags
174229 labels : builder-runner=${{ runner.name }}
175- tags : " devitocodes/bases:nvidia-nvc"
230+ tags : " devitocodes/bases:nvidia-nvc${{ matrix.disable-gil && '-nogil' || '' }} "
176231
177232 - name : NVCC image
178233 uses : docker/build-push-action@v6
@@ -181,9 +236,11 @@ jobs:
181236 file : " ./docker/Dockerfile.nvidia"
182237 push : true
183238 target : " nvcc"
184- build-args : " arch=nvcc"
239+ build-args : |
240+ arch=nvcc
241+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
185242 labels : builder-runner=${{ runner.name }}
186- tags : " devitocodes/bases:nvidia-nvcc"
243+ tags : " devitocodes/bases:nvidia-nvcc${{ matrix.disable-gil && '-nogil' || '' }} "
187244
188245 - name : NVC host image
189246 uses : docker/build-push-action@v6
@@ -192,9 +249,11 @@ jobs:
192249 file : " ./docker/Dockerfile.nvidia"
193250 push : true
194251 target : " nvc-host"
195- build-args : " arch=nvc-host"
252+ build-args : |
253+ arch=nvc-host
254+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
196255 labels : builder-runner=${{ runner.name }}
197- tags : " devitocodes/bases:cpu-nvc"
256+ tags : " devitocodes/bases:cpu-nvc${{ matrix.disable-gil && '-nogil' || '' }} "
198257
199258 # ######################################################
200259 # #################### AMD #############################
@@ -206,6 +265,10 @@ jobs:
206265 env :
207266 DOCKER_BUILDKIT : " 1"
208267
268+ strategy :
269+ matrix :
270+ disable-gil : [false, true]
271+
209272 steps :
210273 - name : Checkout devito
211274 uses : actions/checkout@v4
@@ -225,6 +288,17 @@ jobs:
225288 username : ${{ secrets.DOCKER_USERNAME }}
226289 password : ${{ secrets.DOCKER_PASSWORD }}
227290
291+ - name : cleanup
292+ run : docker system prune -a -f
293+
294+ - name : Build free-threaded base image
295+ uses : docker/build-push-action@v6
296+ if : ${{ matrix.disable-gil }}
297+ with :
298+ context : .
299+ file : " ./docker/Dockerfile.nogil"
300+ tags : " ubuntu-nogil"
301+
228302 - name : AMD image
229303 uses : docker/build-push-action@v6
230304 with :
@@ -236,7 +310,8 @@ jobs:
236310 ROCM_VERSION=5.5.1
237311 UCX_BRANCH=v1.13.1
238312 OMPI_BRANCH=v4.1.4
239- tags : devitocodes/bases:amd
313+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
314+ tags : devitocodes/bases:amd${{ matrix.disable-gil && '-nogil' || '' }}
240315
241316 - name : AMD HIP image
242317 uses : docker/build-push-action@v6
@@ -247,4 +322,5 @@ jobs:
247322 target : " hip"
248323 build-args : |
249324 ROCM_VERSION=6.3.4
250- tags : devitocodes/bases:amd-hip
325+ ${{ matrix.disable-gil && 'FROM_IMAGE=ubuntu-nogil' || '' }}
326+ tags : devitocodes/bases:amd-hip${{ matrix.disable-gil && '-nogil' || '' }}
0 commit comments