Skip to content

Do not update permissions for user cache #2295

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

peterjasc
Copy link

@peterjasc peterjasc commented May 7, 2025

Describe your changes

When building images on macOS Version 15.4.1
docker build ./images/pyspark-notebook --platform linux/amd64
returns

#5 28.91 chgrp: changing group of '/home/jovyan/.cache/rosetta': Operation not permitted
#5 28.93 chmod: changing permissions of '/home/jovyan/.cache/rosetta': Operation not permitted

Instead of chaging permissions for cache, we should ignore it.

Issue ticket if applicable

#2296

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes

@manics
Copy link
Contributor

manics commented May 7, 2025

Isn't this hiding an underlying problem? What's causing the incorrect permissions in the first place, and if they're wrong won't this potentially cause problems for the user at runtime?

@peterjasc
Copy link
Author

peterjasc commented May 7, 2025

Maybe removing /home/jovyan/.cache/rosetta is better. These files there because the mac is emulating amd64 and therefore are not required during running the image for non-ARM machines. If they were needed for macOS run, the OS should create them, since they are cache files

See: docker/for-mac#7440

Copy link
Member

@mathbunnyru mathbunnyru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this implementation because it creates the impression that these files are created after mamba install and somehow related to mamba.
But that's not the case, as far as I understand.

I like the approach here (but only rm rosetta dir, not the whole cache dir): before switching from root to some user we delete the folder.
At least it will limit the number of places where you have to make this change (and our recipes won't change), and this is more clear if someone also has this problem: docker/for-mac#7440 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants