Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/UploadDockerImages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,22 @@
workflow_dispatch:

jobs:
build-image:

Check warning on line 28 in .github/workflows/UploadDockerImages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

UploadDockerImages.yml:28: overly broad permissions: default permissions used due to no permissions: block
runs-on: ["self-hosted", "e2", "cpu"]
steps:
- uses: actions/checkout@v5

Check failure on line 31 in .github/workflows/UploadDockerImages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 31 in .github/workflows/UploadDockerImages.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

UploadDockerImages.yml:31: unpinned action reference: action is not pinned to a hash (required by blanket policy)
- name: Cleanup old docker images
run: docker system prune --all --force
- name: build maxdiffusion stable image
id: build_stable
run: |
bash .github/workflows/build_and_upload_images.sh CLOUD_IMAGE_NAME=maxdiffusion_jax_stable MODE=stable PROJECT=tpu-prod-env-multipod LOCAL_IMAGE_NAME=maxdiffusion_jax_stable
# The stable and nightly images are independent artifacts with independent
# consumers. Without `if: always()` a failure in the stable build silently
# skips the nightly build, which is how the nightly image went stale for
# 18 consecutive days while its own build was healthy.
- name: build maxdiffusion nightly image
id: build_nightly
if: always()
run: |
bash .github/workflows/build_and_upload_images.sh CLOUD_IMAGE_NAME=maxdiffusion_jax_nightly MODE=nightly PROJECT=tpu-prod-env-multipod LOCAL_IMAGE_NAME=maxdiffusion_jax_nightly
2 changes: 1 addition & 1 deletion docker_build_dependency_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if [[ ${DEVICE} == "gpu" ]]; then
docker build --network host --build-arg MODE=${MODE} --build-arg JAX_VERSION=$JAX_VERSION --build-arg DEVICE=$DEVICE --build-arg BASEIMAGE=$BASEIMAGE -f ./maxdiffusion_gpu_dependencies.Dockerfile -t ${LOCAL_IMAGE_NAME} .
else
# Default to maxdiffusion_dependencies.Dockerfile for non-GPU builds
export BASEIMAGE=${BASEIMAGE:-python:3.12-slim-bullseye}
export BASEIMAGE=${BASEIMAGE:-python:3.12-slim-bookworm}
docker build --no-cache \
--network=host \
--build-arg MODE=${MODE} \
Expand Down
9 changes: 5 additions & 4 deletions maxdiffusion_dependencies.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use Python 3.12-slim-bullseye as the base image unless overridden
ARG BASEIMAGE=python:3.12-slim-bullseye
# Use Python 3.12-slim-bookworm as the base image unless overridden
ARG BASEIMAGE=python:3.12-slim-bookworm
FROM $BASEIMAGE

# Environment variable for no-cache-dir and pip root user warning
Expand All @@ -23,8 +23,9 @@ RUN apt-get update && apt-get install -y apt-utils git curl gnupg procps iproute
RUN curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list

# Install the Google Cloud SDK
RUN apt-get update && apt-get install -y google-cloud-sdk && rm -rf /var/lib/apt/lists/*
# Install the Google Cloud CLI. The `google-cloud-sdk` package was retired
# upstream and is replaced by `google-cloud-cli`, which provides gcloud/gsutil/bq.
RUN apt-get update && apt-get install -y google-cloud-cli && rm -rf /var/lib/apt/lists/*

# Install diagnostic and storage dependencies using uv
RUN python -m uv pip install --system \
Expand Down
Loading