-
Notifications
You must be signed in to change notification settings - Fork 511
Publish Codespace docker image with release #3653
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
base: develop
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Documentation Link Check Results✅ Absolute links check passed |
FROM zenmldocker/zenml:latest as base | ||
|
||
# Set user to root for installations | ||
USER root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This never gets changed back.
# Expose the default code-server port (optional, for documentation) | ||
EXPOSE 8080 | ||
|
||
# Default command - using dumb-init is often good practice with containers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me it feels like this entire image is just a copy of some modal example? Wouldn't it be easier to simply use their image and install zenml in it?
@@ -89,9 +89,16 @@ jobs: | |||
needs: wait-for-package-release | |||
uses: ./.github/workflows/publish_docker_image.yml | |||
secrets: inherit | |||
publish-helm-chart: | |||
publish-codespace-image: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this needs to happen before the helm chart necessarily? As this doesn't actually block the OSS release, I would have this at the end of the GH action somewhere, where it failing doesn't actually cause some crucial release actions to not start.
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version tag (leave empty for latest)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I leave this empty, the tag will never be latest
- main | ||
- develop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this action to trigger automatically anywhere. It should build the image at release, and if anything there should be another option to trigger it manually I think
with: | ||
context: . | ||
file: ./docker/zenml-codespace.Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if it's a PR event, it should just build the docker image but not push it? 🤔
push: ${{ github.event_name != 'pull_request' }} | ||
tags: | | ||
zenmldocker/zenml-codespace:${{ env.VERSION }} | ||
${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && 'zenmldocker/zenml-codespace:latest' || '' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A push to main should not overwrite the latest image, this should happen only on release.
@safoinme just had an idea about this. I haven't taken a deep look at this, but if this pushes a set of Docker images with every release, you can possibly add this to the cloudbuild configuration. |
Describe changes
This adds Github action and Dockerfile to build and push docker image for the codespace with release. This image builds on top of zenml lates docker image and add code-server dependency
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes