Getting error exec /opt/.sagemakerinternal/conda/kgw_variant: exec format error
Hi All,
I'm using https://github.com/aws-samples/sagemaker-studio-custom-image-samples/tree/main/examples/python-poetry-image
to bring the custom image to Sagemaker Studio.
However, when I start the notebook, with this custom image using apptype KernelGateway, it's takes a lot time to load and in my cloudwatch loggroup I see exec /opt/.sagemakerinternal/conda/kgw_variant: exec format error .
Does anyone knows, why this error message? or how can I fix this?
I had the same issue and the problem was that I was doing the build on a Mac with M1 Apple Silicon, and the architecture of the image that I was building was not compatible with AWS.
The solution is simply to specify the architecture in the Dockerfile or in the build command:
--platform=linux/amd64
@manas86, if it has been solved (as discussed here) maybe you should close this issue... What do you think?