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

Fix: cache_dir.mkdir is causing issue when cache_dir is readonly #381

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

youkefan18
Copy link

When deploying application in production, there would be cases where models are pre-downloaded and mounted as read only folder for image to use.

This pull request checks if cache_dir already exists before trying to 'mkdir' to avoid permission issue.

@joein
Copy link
Member

joein commented Nov 7, 2024

Hey @youkefan18

I tried to reproduce the issue with the current code

I did the following

mkdir qwerty
chmod 555 qwerty
from pathlib import Path
Path('qwerty').mkdir(parents=True, exist_ok=True)

No error was risen
Are you sure that cache_dir actually exists?

@joein joein self-requested a review November 7, 2024 10:50
@joein
Copy link
Member

joein commented Nov 13, 2024

Hey @youkefan18

Is this still relevant for you?

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