From e0912b5688a393795e5be4db4fd77fe2fbfadf8e Mon Sep 17 00:00:00 2001 From: Rohit Das <43847374+therohitdas@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:20:58 +0530 Subject: [PATCH 1/7] feat: multi architecture build added --- .github/workflows/docker-build.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 2715e6524..ca33f68c6 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -25,6 +25,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + # Required for multi architecture build + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Required for multi architecture build + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 @@ -42,9 +48,11 @@ jobs: # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. - name: Build and push Docker image - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + uses: docker/build-push-action@v5 with: context: . push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + builder: ${{ env.REGISTRY }}/buildx-ghcr tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 857ee92b09f70c24a71d0f7741a78c88a037d78f Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 8 Dec 2023 23:30:23 -0500 Subject: [PATCH 2/7] fix: build error temp fix --- .github/workflows/docker-build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index ca33f68c6..1ceebddc8 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -53,6 +53,5 @@ jobs: context: . push: true platforms: linux/amd64,linux/arm64,linux/arm/v7 - builder: ${{ env.REGISTRY }}/buildx-ghcr tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 3c30e04127eaac5bc0dd8c52db6a573ec69cd895 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 8 Dec 2023 23:39:22 -0500 Subject: [PATCH 3/7] build: arm/v7 removed --- .github/workflows/docker-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 1ceebddc8..f4637063c 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -52,6 +52,6 @@ jobs: with: context: . push: true - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 7074a882b4483399be027e9dfb3fe1c8f1d4d331 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 21:03:03 -0800 Subject: [PATCH 4/7] fix: ollamahub modelfile import with username --- src/routes/(app)/modelfiles/create/+page.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/(app)/modelfiles/create/+page.svelte b/src/routes/(app)/modelfiles/create/+page.svelte index 6e4e3f7d2..18dee2d3d 100644 --- a/src/routes/(app)/modelfiles/create/+page.svelte +++ b/src/routes/(app)/modelfiles/create/+page.svelte @@ -228,7 +228,9 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, ''); imageUrl = modelfile.imageUrl; title = modelfile.title; await tick(); - tagName = `${modelfile.user.username}/${modelfile.tagName}`; + tagName = `${modelfile.user.username === 'hub' ? '' : `hub/`}${modelfile.user.username}/${ + modelfile.tagName + }`; desc = modelfile.desc; content = modelfile.content; suggestions = From 453674aeb7dcab07e9930aff9d0eed9d92531c03 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 21:05:03 -0800 Subject: [PATCH 5/7] feat: modelfile ollamahub link to creator --- src/lib/components/chat/Messages.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 7e950d312..3c021664f 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -325,7 +325,7 @@ {#if selectedModelfile.user}
- By {selectedModelfile.user.name ? selectedModelfile.user.name : `@${selectedModelfile.user.username}`} Date: Sun, 10 Dec 2023 15:14:47 -0800 Subject: [PATCH 6/7] fix: code styling for safari --- src/app.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.css b/src/app.css index 410a956a7..34621fde6 100644 --- a/src/app.css +++ b/src/app.css @@ -15,8 +15,8 @@ html { } code { - white-space-collapse: preserve !important; - white-space: nowrap; + /* white-space-collapse: preserve !important; */ + white-space: pre; width: auto; } From fb83c5762e4fb10585c8adc5ca3aba6e6922ec46 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 10 Dec 2023 15:23:44 -0800 Subject: [PATCH 7/7] Update Messages.svelte --- src/lib/components/chat/Messages.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 3c021664f..36fc6ce39 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -7,7 +7,7 @@ import auto_render from 'katex/dist/contrib/auto-render.mjs'; import 'katex/dist/katex.min.css'; - import { config, db, modelfiles, settings, user } from '$lib/stores'; + import { chatId, config, db, modelfiles, settings, user } from '$lib/stores'; import { tick } from 'svelte'; import toast from 'svelte-french-toast'; @@ -192,7 +192,7 @@ history.currentId = userMessageId; await tick(); - await sendPrompt(userPrompt, userMessageId); + await sendPrompt(userPrompt, userMessageId, $chatId); }; const cancelEditMessage = (messageId) => {