Skip to content

Commit

Permalink
fix: python docker build architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmeyer committed Sep 17, 2024
1 parent 5b183e6 commit 7205f79
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion platform/src/components/aws/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,12 @@ export class Function extends Component implements Link.Linkable {
registryId: bootstrapData.assetEcrRegistryId,
});

const archPlatformMap: Record<string, Platform> = {
"arm64": "linux/arm64",
"x86_64": "linux/amd64"
}

const platforms = architectures.apply((architectures) => architectures.map((arch) => archPlatformMap[arch]))
// build image
//aws-python-container::sst:aws:Function::MyPythonFunction
return new Image(
Expand Down Expand Up @@ -1658,7 +1664,7 @@ export class Function extends Component implements Link.Linkable {
inline: {},
},
],
/// TODO: walln - enable arm64 builds by using architecture args
platforms,
push: true,
registries: [
authToken.apply((authToken) => ({
Expand Down

0 comments on commit 7205f79

Please sign in to comment.