Skip to content

Commit b182977

Browse files
authored
Ensure the CPU Docker Image is tagged with 'latest' (MemMachine#776)
* Ensure the CPU Docker Image is tagged with 'latest' * Update message prompt to use 'latest-cpu' as the example, rather than 'latest-gpu'. * Use 'tag' not 'tags' when referring to 'latest' in the prompt message --------- Signed-off-by: GitHub <[email protected]>
1 parent 4aedebb commit b182977

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,15 @@ jobs:
9999
context: .
100100
file: ./Dockerfile
101101
push: true
102+
# FIXED: Explicitly disable GPU here to ensure 'latest' is the CPU version
103+
build-args: |
104+
GPU=false
102105
tags: ${{ steps.meta-cpu.outputs.tags }}
103106
labels: ${{ steps.meta-cpu.outputs.labels }}
104107
platforms: linux/amd64,linux/arm64
105-
cache-from: type=gha
106-
cache-to: type=gha,mode=max
108+
# FIXED: Added scope 'build-cpu' to isolate this cache
109+
cache-from: type=gha,scope=build-cpu
110+
cache-to: type=gha,mode=max,scope=build-cpu
107111

108112
# Step 7: Show the digest of the built CPU image (useful for traceability)
109113
- name: Show CPU image digest
@@ -185,8 +189,9 @@ jobs:
185189
tags: ${{ steps.meta-gpu.outputs.tags }}
186190
labels: ${{ steps.meta-gpu.outputs.labels }}
187191
platforms: linux/amd64,linux/arm64
188-
cache-from: type=gha
189-
cache-to: type=gha,mode=max
192+
# FIXED: Added scope 'build-gpu' to isolate this cache
193+
cache-from: type=gha,scope=build-gpu
194+
cache-to: type=gha,mode=max,scope=build-gpu
190195

191196
# Step 7: Show the digest of the built GPU image (useful for traceability)
192197
- name: Show GPU image digest

build-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ get_interactive_choices() {
177177
if [[ -z "$VERSION" ]]; then error "Version tag cannot be empty."; fi
178178
fi
179179

180-
msg "A 'latest' tag (e.g., 'latest-gpu') acts as a pointer to the newest stable release."
181-
read -p "Apply 'latest' tags for this version? (Y/n): " push_latest_choice
180+
msg "A 'latest' tag (e.g., 'latest-cpu') acts as a pointer to the newest stable release."
181+
read -p "Apply 'latest' tag for this version? (Y/n): " push_latest_choice
182182
if [[ ! "$push_latest_choice" =~ ^[nN]$ ]]; then PUSH_LATEST=true; fi
183183

184184
read -p "Select action (1: Build locally, 2: Build and Push, 3: Cancel) [2]: " action_choice

0 commit comments

Comments
 (0)