Fedir Zadniprovskyi 01-08
fix: permission error due to volume being mounted as root
@2fdba696eec4bb4fa4f4996aec0ea5a68dc4431b
Dockerfile
--- Dockerfile
+++ Dockerfile
@@ -26,6 +26,10 @@
 COPY --chown=ubuntu ./src ./pyproject.toml ./uv.lock ./
 RUN --mount=type=cache,target=/root/.cache/uv \
     uv sync --frozen --compile-bytecode --extra ui
+# Creating a directory for the cache to avoid the following error:
+# PermissionError: [Errno 13] Permission denied: '/home/ubuntu/.cache/huggingface/hub'
+# This error occurs because the volume is mounted as root and the `ubuntu` user doesn't have permission to write to it. Pre-creating the directory solves this issue.
+RUN mkdir -p $HOME/.cache/huggingface
 ENV WHISPER__MODEL=Systran/faster-whisper-large-v3
 ENV UVICORN_HOST=0.0.0.0
 ENV UVICORN_PORT=8000
Add a comment
List