Skip to content
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

Support arm64 docker images #1485

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .pipelines/templates/build-and-push-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ parameters:
type: string
default: 'docker-compose.yml'
steps:
- script: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
displayName: 'Set up QEMU'

- script: |
docker buildx create --use --name mybuilder
docker buildx inspect mybuilder --bootstrap
displayName: Set up Docker Buildx

- task: DockerCompose@0
displayName: Build Presidio Images
inputs:
Expand All @@ -24,6 +33,8 @@ steps:
IMAGE_PREFIX=${{ parameters.IMAGE_PREFIX }}
TAG=${{ parameters.TAG }}
projectName: 'microsoft_presidio'
buildArguments: '--platform linux/amd64,linux/arm64'


- task: DockerCompose@0
displayName: Push Presidio Images to ACR
Expand All @@ -39,3 +50,4 @@ steps:
REGISTRY_NAME=${{ parameters.REGISTRY_NAME }}
IMAGE_PREFIX=${{ parameters.IMAGE_PREFIX }}
TAG=${{ parameters.TAG }}
buildArguments: '--platform linux/amd64,linux/arm64'
12 changes: 11 additions & 1 deletion .pipelines/templates/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,26 @@ parameters:
type: string
default: ''
steps:
- script: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
displayName: 'Set up QEMU'

- script: |
docker buildx create --use --name mybuilder
docker buildx inspect mybuilder --bootstrap
displayName: Set up Docker Buildx

- task: DockerCompose@0
displayName: Start Presidio Cluster
inputs:
action: Run services
projectName: 'microsoft_presidio'
dockerComposeFile: docker-compose.yml
buildImages: false
buildArguments: '--platform linux/amd64,linux/arm64'
# Start cluster when testing against remote cluster, when an external url is not provided.
condition: eq('${{ parameters.anonymizer_base_url }}', '')

- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
Expand Down
3 changes: 3 additions & 0 deletions docker-compose-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
context: ./presidio-image-redactor
args:
- NAME=presidio-image-redactor
platforms:
- linux/amd64
- linux/arm64
environment:
- PORT=5001
ports:
Expand Down
6 changes: 6 additions & 0 deletions docker-compose-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
context: ./presidio-anonymizer
args:
- NAME=presidio-anonymizer
platforms:
- linux/amd64
- linux/arm64
environment:
- PORT=5001
ports:
Expand All @@ -15,6 +18,9 @@ services:
context: ./presidio-analyzer
args:
- NAME=presidio-analyzer
platforms:
- linux/amd64
- linux/arm64
environment:
- PORT=5001
ports:
Expand Down
6 changes: 6 additions & 0 deletions docker-compose-transformers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
context: ./presidio-anonymizer
args:
- NAME=presidio-anonymizer
platforms:
- linux/amd64
- linux/arm64
environment:
- PORT=5001
ports:
Expand All @@ -16,6 +19,9 @@ services:
args:
- NAME=presidio-analyzer
- NLP_CONF_FILE=presidio_analyzer/conf/transformers.yaml
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.transformers
environment:
- PORT=5001
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
context: ./presidio-anonymizer
args:
- NAME=presidio-anonymizer
platforms:
- linux/amd64
- linux/arm64
environment:
- PORT=5001
ports:
Expand All @@ -15,6 +18,9 @@ services:
context: ./presidio-analyzer
args:
- NAME=presidio-analyzer
platforms:
- linux/amd64
- linux/arm64
environment:
- PORT=5001
ports:
Expand All @@ -25,6 +31,9 @@ services:
context: ./presidio-image-redactor
args:
- NAME=presidio-image-redactor
platforms:
- linux/amd64
- linux/arm64
environment:
- PORT=5001
ports:
Expand Down
Loading