Skip to content

Cannot build an amd64 platform base image on arm64 local machine using environment.yml #601

@Alex-Mackie

Description

@Alex-Mackie

Describe the bug
I'm trying to build the linux base-notebook image on an arm64 Mac using the environment.yml but conda doesn't have permissions to create a cache directory so the build fails with:

#10 0.143 Checking for 'conda-lock.yml' or 'environment.yml'...
#10 0.145 Using environment.yml
#10 0.521 
#10 0.521 CondaError: Error encountered while attempting to create cache directory.
#10 0.521   Directory: /home/jovyan/.cache/conda/notices
#10 0.521   Exception: [Errno 13] Permission denied: '/home/jovyan/.cache/conda'
#10 0.521 

To Reproduce
Steps to reproduce the behavior:

  • Clone the repo
  • Rename or delete conda-lock.yml
  • Run with amd64 target on a MacBook docker buildx build --platform linux/amd64 . --progress plain

Expected behavior
I had hoped this would build a linux amd64 image that I could deploy.

Docker Image Version (e.g. quay.io/pangeo/ml-notebook:2023.02.27):
2025.01.10 and any other tags I tried

Infrastructure (Where you are running this image):
M2 Macbook

Additional context
I'm not a regular docker user so I'm not sure this is something that definitely should work but in our context this seems to be something we used to be able to do but no longer can.

If I don't specify the platform then everything builds as expected as arm64.

If I specify the platform and I keep conda-lock.yml then it builds and can be deployed without issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions