Skip to content

Commit fc6bdd3

Browse files
authored
Fix docker build for marin images. (#1874)
1 parent e432437 commit fc6bdd3

2 files changed

Lines changed: 42 additions & 34 deletions

File tree

.github/workflows/docker-images.yaml

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -86,29 +86,28 @@ jobs:
8686
password: ${{ steps.auth.outputs.access_token }}
8787

8888
- name: Build and push Marin cluster image
89-
uses: docker/build-push-action@v6
90-
with:
91-
push: true
92-
file: docker/marin/Dockerfile.cluster
93-
tags: |
94-
europe-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest
95-
europe-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }}
96-
europe-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }}
97-
us-central1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest
98-
us-central1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }}
99-
us-central1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }}
100-
us-central2-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest
101-
us-central2-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }}
102-
us-central2-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }}
103-
us-east1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest
104-
us-east1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }}
105-
us-east1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }}
106-
us-east5-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest
107-
us-east5-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }}
108-
us-east5-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }}
109-
us-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest
110-
us-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }}
111-
us-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }}
89+
run: |
90+
docker buildx build --file docker/marin/Dockerfile.cluster \
91+
--provenance=false \
92+
--tag europe-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest \
93+
--tag europe-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }} \
94+
--tag europe-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }} \
95+
--tag us-central1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest \
96+
--tag us-central1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }} \
97+
--tag us-central1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }} \
98+
--tag us-central2-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest \
99+
--tag us-central2-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }} \
100+
--tag us-central2-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }} \
101+
--tag us-east1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest \
102+
--tag us-east1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }} \
103+
--tag us-east1-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }} \
104+
--tag us-east5-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest \
105+
--tag us-east5-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }} \
106+
--tag us-east5-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }} \
107+
--tag us-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:latest \
108+
--tag us-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.DATE_TAG }} \
109+
--tag us-west4-docker.pkg.dev/hai-gcp-models/marin/marin_cluster:${{ steps.set-tags.outputs.HASH_TAG }} \
110+
--push .
112111
113112
- name: Install uv
114113
uses: astral-sh/setup-uv@v6
@@ -159,14 +158,13 @@ jobs:
159158
password: ${{ secrets.GITHUB_TOKEN }}
160159

161160
- name: Build and push TPU CI image
162-
uses: docker/build-push-action@v6
163-
with:
164-
push: true
165-
file: docker/marin/Dockerfile.tpu-ci
166-
tags: |
167-
ghcr.io/marin-community/marin/tpu-ci:latest
168-
ghcr.io/marin-community/marin/tpu-ci:${{ steps.set-tags.outputs.DATE_TAG }}
169-
ghcr.io/marin-community/marin/tpu-ci:${{ steps.set-tags.outputs.HASH_TAG }}
161+
run: |
162+
docker buildx build --file docker/marin/Dockerfile.tpu-ci \
163+
--provenance=false \
164+
--tag ghcr.io/marin-community/marin/tpu-ci:latest \
165+
--tag ghcr.io/marin-community/marin/tpu-ci:${{ steps.set-tags.outputs.DATE_TAG }} \
166+
--tag ghcr.io/marin-community/marin/tpu-ci:${{ steps.set-tags.outputs.HASH_TAG }} \
167+
--push .
170168
171169
# Levanter TPU Base Image - Foundation for TPU deployments
172170
levanter-base-image:
@@ -207,7 +205,10 @@ jobs:
207205

208206
- name: Build and push Levanter base image
209207
run: |
210-
docker buildx build --file docker/tpu/Dockerfile.base --tag ghcr.io/${{ github.repository }}-base:latest --tag ghcr.io/${{ github.repository }}-base:${{ env.DATE }} --push .
208+
docker buildx build --file docker/tpu/Dockerfile.base \
209+
--tag ghcr.io/${{ github.repository }}-base:latest \
210+
--tag ghcr.io/${{ github.repository }}-base:${{ env.DATE }} \
211+
--push .
211212
212213
# Levanter TPU Incremental Image - Optimized TPU runtime
213214
levanter-tpu-image:
@@ -249,7 +250,10 @@ jobs:
249250

250251
- name: Build and push Levanter TPU image
251252
run: |
252-
docker buildx build --file docker/tpu/Dockerfile.incremental --tag ghcr.io/${{ github.repository }}-tpu:latest --tag ghcr.io/${{ github.repository }}-tpu:${{ env.DATE }} --push .
253+
docker buildx build --file docker/tpu/Dockerfile.incremental \
254+
--tag ghcr.io/${{ github.repository }}-tpu:latest \
255+
--tag ghcr.io/${{ github.repository }}-tpu:${{ env.DATE }} \
256+
--push .
253257
254258
# Levanter Cluster Image - For cluster deployments
255259
levanter-cluster-image:
@@ -291,4 +295,7 @@ jobs:
291295

292296
- name: Build and push Levanter cluster image
293297
run: |
294-
docker buildx build --file docker/tpu/Dockerfile.cluster --tag ghcr.io/${{ github.repository }}-cluster:latest --tag ghcr.io/${{ github.repository }}-cluster:${{ env.DATE }} --push .
298+
docker buildx build --file docker/tpu/Dockerfile.cluster \
299+
--tag ghcr.io/${{ github.repository }}-cluster:latest \
300+
--tag ghcr.io/${{ github.repository }}-cluster:${{ env.DATE }} \
301+
--push .

docker/marin/Dockerfile.cluster

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ ENV UV_SYSTEM_PYTHON=1
8585

8686
# Install into the system Python environment b/c Ray will use this as a base
8787
COPY --chown=ray pyproject.toml /tmp/marin/
88+
COPY --chown=ray lib/ /tmp/marin/lib/
8889
WORKDIR /tmp/marin
8990
RUN mkdir -p src/marin/\
9091
&& touch src/marin/__init__.py\

0 commit comments

Comments
 (0)