

fix: permission error due to volume being mounted as root
@2fdba696eec4bb4fa4f4996aec0ea5a68dc4431b
--- Dockerfile
+++ Dockerfile
... | ... | @@ -26,6 +26,10 @@ |
26 | 26 |
COPY --chown=ubuntu ./src ./pyproject.toml ./uv.lock ./ |
27 | 27 |
RUN --mount=type=cache,target=/root/.cache/uv \ |
28 | 28 |
uv sync --frozen --compile-bytecode --extra ui |
29 |
+# Creating a directory for the cache to avoid the following error: |
|
30 |
+# PermissionError: [Errno 13] Permission denied: '/home/ubuntu/.cache/huggingface/hub' |
|
31 |
+# 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. |
|
32 |
+RUN mkdir -p $HOME/.cache/huggingface |
|
29 | 33 |
ENV WHISPER__MODEL=Systran/faster-whisper-large-v3 |
30 | 34 |
ENV UVICORN_HOST=0.0.0.0 |
31 | 35 |
ENV UVICORN_PORT=8000 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?