Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated base image to Debian image and changed install commands compatible with Debian image #2528

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Debabrata47
Copy link

What this PR does / why we need it: This PR replaces the docker image from "python:3.11-alpine" to "python:3.11-slim-bookworm" and install command which are compatible with Debian image. As per the comment #2303.

Which issue(s) this PR fixes This PR Fixes #2311 issue and #2312 issue

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign gaocegege for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

From #2312 (comment).

@mani1soni Thank you for this!
Please can you also update the model initializer script and verify locally that this images is working with HF snapshot download API ?

@andreyvelich Do you still want to perform manually checking? Currently, I guess we can verify the behavior by our notebook E2E tests, right?

@@ -10,7 +10,7 @@ COPY pkg/initializer pkg/initializer
RUN pip install -r requirements.txt

# Git is needed for the Kubeflow SDK to download JobSet Python models.
RUN apk update && apk add --no-cache git
RUN apt update && apt install -y git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN apt update && apt install -y git
RUN apt-get update && apt-get install -y git
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

We want to clean up source lists since we want to make images as minimal as possible.
Additionally, apt is an interactive command; in script, apt-get is more stable and appropriate.

@@ -10,7 +10,7 @@ COPY pkg/initializer pkg/initializer
RUN pip install -r requirements.txt

# Git is needed for the Kubeflow SDK to download JobSet Python models.
RUN apk update && apk add --no-cache git
RUN apt update && apt install -y git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN apt update && apt install -y git
RUN apt-get update && apt-get install -y git
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

ditto

@google-oss-prow google-oss-prow bot added size/S and removed size/XS labels Mar 16, 2025
@Debabrata47
Copy link
Author

@tenzen-y Thanks for the feedback, have commited the suggested changes.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks,
/lgtm

I will leave final approval on @andreyvelich

@@ -1,4 +1,4 @@
FROM python:3.11-alpine
FROM python:3.11-slim-bookworm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Debabrata47 Please can you try to build this image locally, and verify that it can download dataset from HF since we don't have e2e tests in our test infra yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Debian images for Python components in the Training Operator V2
3 participants