-
Notifications
You must be signed in to change notification settings - Fork 0
updated dockerfile to support multi arch during build and publish and… #2
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3dc8c68
updated dockerfile to support multi arch during build and publish and…
ArnabChatterjee20k 291fa57
Enhanced dockerfile to include readiness checks for ollama during bui…
ArnabChatterjee20k 1c4f727
updated verify ci workflow
ArnabChatterjee20k 7710d69
updated dockerfile
ArnabChatterjee20k f801dd6
added entrypoint
ArnabChatterjee20k 1e98659
added models available in the failure logs
ArnabChatterjee20k 2c86836
updated
ArnabChatterjee20k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| name: Verify (multi-arch build + smoke) | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build multi-arch (no push) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: appwrite/ollama | ||
| tags: | | ||
| type=sha,format=short | ||
|
|
||
| - name: Build (amd64 + arm64) | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| file: ./dockerfile | ||
| platforms: linux/amd64,linux/arm64 | ||
| push: false | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| build-args: | | ||
| VERSION=${{ steps.meta.outputs.version }} | ||
| MODELS= | ||
| OLLAMA_KEEP_ALIVE=1m | ||
|
|
||
| smoke: | ||
| name: Smoke test (docker compose + embeddings) | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| _APP_EMBEDDING_MODELS: embeddinggemma | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: docker compose up (build + start) | ||
| run: | | ||
| docker compose -f docker-compose.yml up --build -d | ||
|
|
||
| - name: Wait for server | ||
| run: | | ||
| for i in $(seq 1 30); do | ||
| if curl -fsS http://127.0.0.1:11434/api/version >/dev/null; then | ||
| exit 0 | ||
| fi | ||
| sleep 1 | ||
| done | ||
| echo "Ollama did not become ready in time" | ||
| docker logs ollama-verify || true | ||
| exit 1 | ||
|
|
||
| - name: Show version | ||
| run: curl -fsS http://127.0.0.1:11434/api/version | ||
|
|
||
| - name: Test embeddinggemma embeddings | ||
| run: | | ||
| curl -fsS http://127.0.0.1:11434/api/embeddings \ | ||
| -H 'Content-Type: application/json' \ | ||
| -d '{ | ||
| "model": "embeddinggemma", | ||
| "prompt": "Hello from embeddinggemma" | ||
| }' | ||
|
|
||
| - name: Failure logs | ||
| if: failure() | ||
| run: | | ||
| echo "=== Docker Compose Logs ===" | ||
| docker compose -f docker-compose.yml logs || true | ||
|
|
||
| - name: Cleanup | ||
| if: always() | ||
| run: docker compose -f docker-compose.yml down -v || true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.