@@ -45,33 +45,20 @@ jobs:
4545 REF=main
4646 push : true
4747 tags : huggingface/transformers-all-latest-gpu${{ inputs.image_postfix }}
48- # Push CI images still need to be re-built daily
49- -
50- name : Build and push (for Push CI) in a daily basis
51- # This condition allows `schedule` events, or `push` events that trigger this workflow NOT via `workflow_call`.
52- # The later case is useful for manual image building for debugging purpose. Use another tag in this case!
53- if : inputs.image_postfix != '-push-ci'
54- uses : docker/build-push-action@v5
55- with :
56- context : ./docker/transformers-all-latest-gpu
57- build-args : |
58- REF=main
59- push : true
60- tags : huggingface/transformers-all-latest-gpu-push-ci
6148
6249 - name : Post to Slack
6350 if : always()
6451 uses : huggingface/hf-workflows/.github/actions/post-slack@main
6552 with :
6653 slack_channel : ${{ secrets.CI_SLACK_CHANNEL_DOCKER }}
67- title : 🤗 Results of the transformers-all-latest-gpu-push-ci docker build
54+ title : 🤗 Results of the transformers-all-latest-gpu docker build
6855 status : ${{ job.status }}
6956 slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
7057
71- latest-torch-deepspeed-docker :
72- name : " Latest PyTorch + DeepSpeed "
58+ flash-attn-ci-image :
59+ name : " PyTorch with Flash Attn [dev] "
7360 runs-on :
74- group : aws-g4dn-2xlarge-cache
61+ group : aws-general-8-plus
7562 steps :
7663 -
7764 name : Set up Docker Buildx
@@ -89,24 +76,26 @@ jobs:
8976 name : Build and push
9077 uses : docker/build-push-action@v5
9178 with :
92- context : ./docker/transformers-pytorch-deepspeed -latest-gpu
79+ context : ./docker/transformers-all -latest-gpu
9380 build-args : |
9481 REF=main
82+ PYTORCH=2.8.0
83+ TORCHCODEC=0.7.0
84+ FLASH_ATTN=yes
9585 push : true
96- tags : huggingface/transformers-pytorch-deepspeed- latest-gpu${{ inputs.image_postfix }}
86+ tags : huggingface/transformers-all- latest-gpu${{ inputs.image_postfix }}:flash-attn
9787
9888 - name : Post to Slack
9989 if : always()
10090 uses : huggingface/hf-workflows/.github/actions/post-slack@main
10191 with :
102- slack_channel : ${{ secrets.CI_SLACK_CHANNEL_DOCKER}}
103- title : 🤗 Results of the transformers-pytorch-deepspeed -latest-gpu docker build
92+ slack_channel : ${{ secrets.CI_SLACK_CHANNEL_DOCKER }}
93+ title : 🤗 Results of the transformers-all -latest-gpu docker build
10494 status : ${{ job.status }}
10595 slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
10696
107- # Can't build 2 images in a single job `latest-torch-deepspeed-docker` (for `nvcr.io/nvidia`)
108- latest-torch-deepspeed-docker-for-push-ci-daily-build :
109- name : " Latest PyTorch + DeepSpeed (Push CI - Daily Build)"
97+ latest-torch-deepspeed-docker :
98+ name : " Latest PyTorch + DeepSpeed"
11099 runs-on :
111100 group : aws-general-8-plus
112101 steps :
@@ -122,33 +111,27 @@ jobs:
122111 with :
123112 username : ${{ secrets.DOCKERHUB_USERNAME }}
124113 password : ${{ secrets.DOCKERHUB_PASSWORD }}
125- # Push CI images still need to be re-built daily
126114 -
127- name : Build and push (for Push CI) in a daily basis
128- # This condition allows `schedule` events, or `push` events that trigger this workflow NOT via `workflow_call`.
129- # The later case is useful for manual image building for debugging purpose. Use another tag in this case!
130- if : inputs.image_postfix != '-push-ci'
115+ name : Build and push
131116 uses : docker/build-push-action@v5
132117 with :
133118 context : ./docker/transformers-pytorch-deepspeed-latest-gpu
134119 build-args : |
135120 REF=main
136121 push : true
137- tags : huggingface/transformers-pytorch-deepspeed-latest-gpu-push-ci
122+ tags : huggingface/transformers-pytorch-deepspeed-latest-gpu${{ inputs.image_postfix }}
138123
139124 - name : Post to Slack
140125 if : always()
141126 uses : huggingface/hf-workflows/.github/actions/post-slack@main
142127 with :
143- slack_channel : ${{ secrets.CI_SLACK_CHANNEL_DOCKER }}
144- title : 🤗 Results of the transformers-pytorch-deepspeed-latest-gpu-push-ci docker build
128+ slack_channel : ${{ secrets.CI_SLACK_CHANNEL_DOCKER}}
129+ title : 🤗 Results of the transformers-pytorch-deepspeed-latest-gpu docker build
145130 status : ${{ job.status }}
146131 slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
147132
148133 doc-builder :
149134 name : " Doc builder"
150- # Push CI doesn't need this image
151- if : inputs.image_postfix != '-push-ci'
152135 runs-on :
153136 group : aws-general-8-plus
154137 steps :
@@ -181,12 +164,10 @@ jobs:
181164 status : ${{ job.status }}
182165 slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
183166
184- latest-pytorch :
185- name : " Latest PyTorch [dev]"
186- # Push CI doesn't need this image
187- if : inputs.image_postfix != '-push-ci'
167+ latest-pytorch-amd :
168+ name : " Latest PyTorch (AMD) [dev]"
188169 runs-on :
189- group : aws-general-8-plus
170+ group : aws-highcpu-32-priv
190171 steps :
191172 -
192173 name : Set up Docker Buildx
@@ -204,69 +185,51 @@ jobs:
204185 name : Build and push
205186 uses : docker/build-push-action@v5
206187 with :
207- context : ./docker/transformers-pytorch-gpu
188+ context : ./docker/transformers-pytorch-amd- gpu
208189 build-args : |
209190 REF=main
210191 push : true
211- tags : huggingface/transformers-pytorch-gpu
192+ tags : huggingface/transformers-pytorch-amd- gpu${{ inputs.image_postfix }}
212193
213194 - name : Post to Slack
214195 if : always()
215196 uses : huggingface/hf-workflows/.github/actions/post-slack@main
216197 with :
217198 slack_channel : ${{ secrets.CI_SLACK_CHANNEL_DOCKER }}
218- title : 🤗 Results of the huggingface/transformers-pytorch-gpudocker build
199+ title : 🤗 Results of the huggingface/transformers-pytorch-amd-gpu build
219200 status : ${{ job.status }}
220201 slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
221202
222- latest-pytorch-amd :
223- name : " Latest PyTorch (AMD) [dev]"
203+ cache-latest-pytorch-amd :
204+ name : " Cache Latest Pytorch (AMD) Image"
205+ needs : latest-pytorch-amd
224206 runs-on :
225- group : aws-highcpu-32-priv
207+ group : amd-mi325-1gpu
226208 steps :
227- -
228- name : Set up Docker Buildx
229- uses : docker/setup-buildx-action@v3
230- -
231- name : Check out code
232- uses : actions/checkout@v4
233209 -
234210 name : Login to DockerHub
235211 uses : docker/login-action@v3
236212 with :
237213 username : ${{ secrets.DOCKERHUB_USERNAME }}
238214 password : ${{ secrets.DOCKERHUB_PASSWORD }}
239- -
240- name : Build and push
241- uses : docker/build-push-action@v5
242- with :
243- context : ./docker/transformers-pytorch-amd-gpu
244- build-args : |
245- REF=main
246- push : true
247- tags : huggingface/transformers-pytorch-amd-gpu${{ inputs.image_postfix }}
248- # Push CI images still need to be re-built daily
249- -
250- name : Build and push (for Push CI) in a daily basis
251- # This condition allows `schedule` events, or `push` events that trigger this workflow NOT via `workflow_call`.
252- # The later case is useful for manual image building for debugging purpose. Use another tag in this case!
253- if : inputs.image_postfix != '-push-ci'
254- uses : docker/build-push-action@v5
255- with :
256- context : ./docker/transformers-pytorch-amd-gpu
257- build-args : |
258- REF=main
259- push : true
260- tags : huggingface/transformers-pytorch-amd-gpu-push-ci
215+
216+ -
217+ name : Pull and save docker image to cache
218+ run : |
219+ image="huggingface/transformers-pytorch-amd-gpu"
220+ final_path="/mnt/image-cache/transformers-pytorch-amd-gpu.tar"
221+ tmp_path="${final_path}.tmp"
261222
262- - name : Post to Slack
263- if : always()
264- uses : huggingface/hf-workflows/.github/actions/post-slack@main
265- with :
266- slack_channel : ${{ secrets.CI_SLACK_CHANNEL_DOCKER }}
267- title : 🤗 Results of the huggingface/transformers-pytorch-amd-gpu-push-ci build
268- status : ${{ job.status }}
269- slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
223+ echo "Pulling image: ${image}"
224+ docker pull "${image}"
225+
226+ echo "Saving to temp file: ${tmp_path}"
227+ docker save "${image}" -o "${tmp_path}"
228+
229+ echo "Moving to final path: ${final_path}"
230+ mv -f "${tmp_path}" "${final_path}"
231+
232+ echo "Cache populated successfully at ${final_path}"
270233
271234 latest-pytorch-deepspeed-amd :
272235 name : " PyTorch + DeepSpeed (AMD) [dev]"
@@ -294,19 +257,6 @@ jobs:
294257 REF=main
295258 push : true
296259 tags : huggingface/transformers-pytorch-deepspeed-amd-gpu${{ inputs.image_postfix }}
297- # Push CI images still need to be re-built daily
298- -
299- name : Build and push (for Push CI) in a daily basis
300- # This condition allows `schedule` events, or `push` events that trigger this workflow NOT via `workflow_call`.
301- # The later case is useful for manual image building for debugging purpose. Use another tag in this case!
302- if : inputs.image_postfix != '-push-ci'
303- uses : docker/build-push-action@v5
304- with :
305- context : ./docker/transformers-pytorch-deepspeed-amd-gpu
306- build-args : |
307- REF=main
308- push : true
309- tags : huggingface/transformers-pytorch-deepspeed-amd-gpu-push-ci
310260
311261 - name : Post to Slack
312262 if : always()
@@ -319,8 +269,6 @@ jobs:
319269
320270 latest-quantization-torch-docker :
321271 name : " Latest Pytorch + Quantization [dev]"
322- # Push CI doesn't need this image
323- if : inputs.image_postfix != '-push-ci'
324272 runs-on :
325273 group : aws-general-8-plus
326274 steps :
0 commit comments