-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Support arm docker build #6061
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 all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c9dc059
feat: support arm docker build
Anarion-zuo e3cd924
docker ci test
Anarion-zuo ea8f978
support dev
Anarion-zuo 3455c02
publish feature-server-dev
Anarion-zuo 82a7265
master_only trigger
Anarion-zuo 5cba559
master_only docker build use make
Anarion-zuo 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,112 @@ | ||
| name: docker-smoke-tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "sdk/python/feast/infra/feature_servers/multicloud/**" | ||
| - "sdk/python/feast/feature_server.py" | ||
| - "infra/scripts/feature_server_docker_smoke.py" | ||
| - "Makefile" | ||
| - ".github/workflows/publish_images.yml" | ||
| - ".github/workflows/docker_smoke_tests.yml" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| feature-server-docker-smoke: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: [amd64, arm64] | ||
| steps: | ||
| - 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 | ||
| with: | ||
| install: true | ||
| - name: Build feature-server image | ||
| env: | ||
| ARCH: ${{ matrix.arch }} | ||
| run: | | ||
| make build-feature-server-docker REGISTRY=feastdev VERSION=smoke-${ARCH} DOCKER_PLATFORMS=linux/${ARCH} | ||
| - name: Run container | ||
| env: | ||
| ARCH: ${{ matrix.arch }} | ||
| run: | | ||
| docker run -d --rm \ | ||
| --name feature-server-smoke-${ARCH} \ | ||
| --platform linux/${ARCH} \ | ||
| -p 6566:6566 \ | ||
| -v "${GITHUB_WORKSPACE}/infra/scripts/feature_server_docker_smoke.py:/smoke.py:ro" \ | ||
| feastdev/feature-server:smoke-${ARCH} \ | ||
| python /smoke.py | ||
| - name: Wait for /health | ||
| run: | | ||
| for i in $(seq 1 60); do | ||
| if curl -fsS http://localhost:6566/health >/dev/null; then | ||
| exit 0 | ||
| fi | ||
| sleep 2 | ||
| done | ||
| echo "feature-server /health did not become ready" | ||
| docker logs feature-server-smoke-${{ matrix.arch }} || true | ||
| exit 1 | ||
| - name: Cleanup | ||
| if: always() | ||
| env: | ||
| ARCH: ${{ matrix.arch }} | ||
| run: | | ||
| docker stop feature-server-smoke-${ARCH} || true | ||
| feature-server-dev-docker-smoke: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: [amd64, arm64] | ||
| steps: | ||
| - 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 | ||
| with: | ||
| install: true | ||
| - name: Build feature-server-dev image | ||
| env: | ||
| ARCH: ${{ matrix.arch }} | ||
| run: | | ||
| make build-feature-server-dev-docker REGISTRY=feastdev VERSION=smoke-${ARCH} DOCKER_PLATFORMS=linux/${ARCH} | ||
| - name: Run container | ||
| env: | ||
| ARCH: ${{ matrix.arch }} | ||
| run: | | ||
| docker run -d --rm \ | ||
| --name feature-server-dev-smoke-${ARCH} \ | ||
| --platform linux/${ARCH} \ | ||
| -p 6566:6566 \ | ||
| -v "${GITHUB_WORKSPACE}/infra/scripts/feature_server_docker_smoke.py:/smoke.py:ro" \ | ||
| feastdev/feature-server:smoke-${ARCH} \ | ||
| python /smoke.py | ||
| - name: Wait for /health | ||
| run: | | ||
| for i in $(seq 1 60); do | ||
| if curl -fsS http://localhost:6566/health >/dev/null; then | ||
| exit 0 | ||
| fi | ||
| sleep 2 | ||
| done | ||
| echo "feature-server /health did not become ready" | ||
| docker logs feature-server-dev-smoke-${{ matrix.arch }} || true | ||
| exit 1 | ||
| - name: Cleanup | ||
| if: always() | ||
| env: | ||
| ARCH: ${{ matrix.arch }} | ||
| run: | | ||
| docker stop feature-server-dev-smoke-${ARCH} || 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
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
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
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,38 @@ | ||
| from types import SimpleNamespace | ||
|
|
||
| import uvicorn | ||
|
|
||
| from feast.feature_server import get_app | ||
|
|
||
|
|
||
| class _FakeRegistry: | ||
| def proto(self): | ||
| return object() | ||
|
|
||
|
|
||
| class _FakeStore: | ||
| def __init__(self): | ||
| self.config = SimpleNamespace() | ||
| self.registry = _FakeRegistry() | ||
| self._provider = SimpleNamespace( | ||
| async_supported=SimpleNamespace( | ||
| online=SimpleNamespace(read=False, write=False) | ||
| ) | ||
| ) | ||
|
|
||
| def _get_provider(self): | ||
| return self._provider | ||
|
|
||
| async def initialize(self): | ||
| return None | ||
|
|
||
| def refresh_registry(self): | ||
| return None | ||
|
|
||
| async def close(self): | ||
| return None | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| app = get_app(_FakeStore()) | ||
| uvicorn.run(app, host="0.0.0.0", port=6566, log_level="error") |
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.
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.
also .github/workflows/docker_smoke_tests.yml
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.
done