From 7365661b8f80ee04257a71809314a82a1dae1997 Mon Sep 17 00:00:00 2001 From: StreetLamb Date: Fri, 12 Jul 2024 23:18:37 +0800 Subject: [PATCH] Fix embedding models and upload permission issues --- backend/Dockerfile | 2 +- backend/app/api/routes/uploads.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 0dcc3081..d8d4b097 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -31,7 +31,7 @@ COPY ./app /app/app RUN addgroup --system celery && adduser --system --ingroup celery celery # Create necessary directories -RUN mkdir -p /app/.cache/huggingface +RUN mkdir -p /app/.cache/huggingface /app/cache/ /app/upload-data/ # Set HuggingFace cache directory environment variable ENV HF_HOME=/app/.cache/huggingface diff --git a/backend/app/api/routes/uploads.py b/backend/app/api/routes/uploads.py index b8d17b51..ccba8b03 100644 --- a/backend/app/api/routes/uploads.py +++ b/backend/app/api/routes/uploads.py @@ -86,7 +86,7 @@ def move_upload_to_shared_folder(filename: str, temp_file_dir: str) -> str: file_name = f"{uuid.uuid4()}-{filename}" file_path = f"/app/upload-data/{file_name}" shutil.move(temp_file_dir, file_path) - os.chmod(file_path, 0o644) + os.chmod(file_path, 0o775) return file_path