-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add template for kubimo #163
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /target | ||
| .env* | ||
| .venv | ||
| dist | ||
| __pycache__/ | ||
| *.so |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,7 +128,6 @@ jobs: | |
| permissions: | ||
| contents: read | ||
| packages: write | ||
| needs: release | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Docker setup | ||
|
|
@@ -139,27 +138,30 @@ jobs: | |
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Docker meta | ||
| id: meta | ||
| - name: Docker meta kubimo | ||
| id: meta-kubimo | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/aqora-io/cli | ||
| flavor: | | ||
| latest=false | ||
| images: ghcr.io/aqora-io/cli-kubimo | ||
| bake-target: docker-metadata-kubimo | ||
| tags: | | ||
| type=schedule | ||
| type=ref,event=branch,prefix=${{ env.TAG_PREFIX }}branch- | ||
| type=ref,event=tag,prefix=${{ env.TAG_PREFIX }}tag- | ||
| type=ref,event=pr,prefix=${{ env.TAG_PREFIX }}pr- | ||
| type=raw,value=latest,prefix=${{ env.TAG_PREFIX }},enable={{is_default_branch}} | ||
| - name: Docker build and push | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| type=ref,event=branch | ||
| type=ref,event=pr | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} | ||
| - name: Build and push | ||
| uses: docker/bake-action@v6 | ||
| with: | ||
| set: | | ||
| kubimo*.cache-from=type=registry,ref=ghcr.io/aqora-io/cli-kubimo:latest | ||
| *.cache-to=type=inline | ||
| files: | | ||
| ./docker-bake.hcl | ||
| cwd://${{ steps.meta-kubimo.outputs.bake-file }} | ||
| # TODO: change before merging | ||
| # push: ${{ github.event_name != 'pull_request' }} | ||
| push: true | ||
|
|
||
|
Comment on lines
+141
to
165
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid unconditional image pushes from all events The metadata + bake wiring for the kubimo image looks good now, but: # TODO: change before merging
# push: ${{ github.event_name != 'pull_request' }}
push: trueWith - # TODO: change before merging
- # push: ${{ github.event_name != 'pull_request' }}
- push: true
+ push: ${{ github.event_name != 'pull_request' }}so PRs still build but only non‑PR refs publish images. 🤖 Prompt for AI Agents |
||
| npm: | ||
| name: Build and publish npm package | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| variable "TAG" { | ||
| default = "dev" | ||
| } | ||
|
|
||
| target "docker-metadata-kubimo" { | ||
| tags = ["ghcr.io/aqora-io/cli-kubimo:${TAG}"] | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| group "default" { | ||
| targets = ["kubimo"] | ||
| } | ||
|
|
||
| target "docker-metadata-kubimo" {} | ||
|
|
||
| target "kubimo" { | ||
| inherits = ["docker-metadata-kubimo"] | ||
| context = "." | ||
| dockerfile = "docker/Dockerfile.kubimo" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| FROM ghcr.io/aqora-io/kubimo-marimo:main AS build | ||
|
|
||
| USER 0 | ||
| RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --no-update-default-toolchain | ||
| ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
|
||
| WORKDIR /build | ||
| COPY rust-toolchain . | ||
| RUN rustc --version | ||
| COPY . . | ||
| RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \ | ||
| --mount=type=cache,target=/usr/local/cargo/git,sharing=locked \ | ||
| --mount=type=cache,target=target,sharing=locked \ | ||
| cargo build --release \ | ||
| && cp target/release/aqora /bin/aqora | ||
|
|
||
| WORKDIR /workspace | ||
| RUN aqora new dataset-marimo -s user/workspace -v 0.0.0 . && rm readme.py | ||
|
|
||
| FROM ghcr.io/aqora-io/kubimo-marimo:main | ||
|
|
||
| COPY --chown=1000:1000 ./docker/kubimo/marimo /home/me/.config/marimo | ||
| COPY --from=build /bin/aqora /bin/aqora | ||
| COPY --chown=1000:1000 --from=build /workspace/* . | ||
| RUN uv venv && uv sync |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans+Mono:[email protected]&display=swap"); | ||
|
|
||
| :root { | ||
| --background: hsl(0 0% 99.2%); | ||
| --marimo-monospace-font: "Noto Sans Mono", monospace; | ||
| --marimo-text-font: "Inter", sans-serif; | ||
| --marimo-heading-font: "Inter", sans-serif; | ||
| } | ||
|
|
||
| #App[data-config-width="full"] > div { | ||
| padding-inline: calc(var(--spacing, 0.25rem) * 10); | ||
| } | ||
|
|
||
| #App[data-config-width="full"][data-command="run"] > div { | ||
| padding-left: 0; | ||
| padding-top: 0; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,78 @@ | ||||||
| [completion] | ||||||
| activate_on_typing = true | ||||||
| copilot = false | ||||||
|
|
||||||
| [language_servers.ty] | ||||||
| enabled = true | ||||||
|
|
||||||
| [language_servers.basedpyright] | ||||||
|
|
||||||
| [language_servers.pylsp] | ||||||
| enable_pyflakes = false | ||||||
| enable_mypy = true | ||||||
| enabled = false | ||||||
| enable_pylint = false | ||||||
| enable_flake8 = false | ||||||
| enable_pydocstyle = false | ||||||
| enable_ruff = true | ||||||
|
|
||||||
| [save] | ||||||
| format_on_save = false | ||||||
| autosave = "after_delay" | ||||||
| autosave_delay = 1000 | ||||||
|
|
||||||
| [runtime] | ||||||
| auto_reload = "off" | ||||||
| std_stream_max_bytes = 1000000 | ||||||
| reactive_tests = true | ||||||
| watcher_on_save = "lazy" | ||||||
| output_max_bytes = 8000000 | ||||||
| default_auto_download = ["html"] | ||||||
| on_cell_change = "autorun" | ||||||
| auto_instantiate = false | ||||||
| default_sql_output = "auto" | ||||||
| dotenv = [".env"] | ||||||
|
|
||||||
| [package_management] | ||||||
| manager = "uv" | ||||||
|
|
||||||
| [formatting] | ||||||
| line_length = 79 | ||||||
|
|
||||||
| [diagnostics] | ||||||
| enabled = false | ||||||
|
|
||||||
| [ai] | ||||||
| rules = "" | ||||||
| mode = "manual" | ||||||
|
|
||||||
| [ai.models] | ||||||
| custom_models = [] | ||||||
| displayed_models = [] | ||||||
|
|
||||||
| [experimental] | ||||||
|
|
||||||
| [keymap] | ||||||
| preset = "default" | ||||||
| destructive_delete = true | ||||||
|
|
||||||
| [keymap.overrides] | ||||||
|
|
||||||
| [display] | ||||||
| default_table_max_columns = 50 | ||||||
| default_table_page_size = 10 | ||||||
| cell_output = "below" | ||||||
| default_width = "full" | ||||||
| theme = "light" | ||||||
| code_editor_font_size = 14 | ||||||
| dataframes = "rich" | ||||||
| reference_highlighting = false | ||||||
| custom_css = ["/home/me/.config/marimo/marimo.css"] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix hardcoded user-specific path. The custom CSS path Consider one of these approaches:
Apply this diff to use a more generic path: -custom_css = ["/home/me/.config/marimo/marimo.css"]
+custom_css = ["/home/marimo/.config/marimo/marimo.css"]📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| [server] | ||||||
| follow_symlink = false | ||||||
| browser = "default" | ||||||
|
|
||||||
| [snippets] | ||||||
| include_default_snippets = true | ||||||
| custom_paths = [] | ||||||
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.
🧩 Analysis chain
Verify bake inputs reference the correct targets.
The
setandfilesinputs referencekubimo*anddocker-metadata-kubimotargets. Confirm that:./docker-bake.hcldefines akubimotarget anddocker-metadata-kubimotargetghcr.io/aqora-io/cli-kubimo:latest) aligns with your image naming strategycwd://${{ steps.meta-kubimo.outputs.bake-file }}correctly resolves to the metadata action's output file🏁 Script executed:
Length of output: 351
Length of output: 131
Length of output: 2094
Length of output: 750
💡 Result:
Yes — docker/metadata-action@v5 can generate bake files. It exposes file outputs you can pass to docker/bake-action (examples):
Example snippet:
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: name/app
uses: docker/bake-action@v6
with:
files: |
./docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file-tags }}
cwd://${{ steps.meta.outputs.bake-file-annotations }}
targets: build
References: Docker metadata-action README (outputs and bake-file usage). [1][2]
Sources:
[1] docker/metadata-action README — outputs & bake-file examples.
[2] docker/metadata-action Marketplace usage (bake definition example).
Fix bake-file output reference — incorrect output name will cause workflow failure.
Line 161:
cwd://${{ steps.meta-kubimo.outputs.bake-file }}references a non-existent output. docker/metadata-action@v5 produces outputsbake-file-tags,bake-file-labels, andbake-file-annotations, not a plainbake-fileoutput.Update line 161 to use the correct output, e.g.,
cwd://${{ steps.meta-kubimo.outputs.bake-file-tags }}.🤖 Prompt for AI Agents