Commit ·
358e82f
1
Parent(s): 60e69f7
fix: Correct cache directory permissions for deployment
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
|
@@ -10,12 +10,14 @@ COPY ./requirements.txt /code/requirements.txt
|
|
| 10 |
# Install any needed packages specified in requirements.txt
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
| 13 |
-
# ---
|
| 14 |
-
# Create a writable directory for
|
| 15 |
-
RUN mkdir /code/cache
|
| 16 |
-
# Tell
|
| 17 |
-
ENV
|
| 18 |
-
#
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Copy your application code into the container
|
| 21 |
COPY ./app /code/app
|
|
|
|
| 10 |
# Install any needed packages specified in requirements.txt
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
| 13 |
+
# --- START: FINAL PERMISSION FIX ---
|
| 14 |
+
# Create a writable cache directory AND set the correct owner for the app user
|
| 15 |
+
RUN mkdir /code/cache && chown -R user:user /code/cache
|
| 16 |
+
# Tell all Hugging Face libraries to use this new directory (the modern way)
|
| 17 |
+
ENV HF_HOME=/code/cache
|
| 18 |
+
# Also set the specific variable for sentence-transformers for good measure
|
| 19 |
+
ENV SENTENCE_TRANSFORMERS_HOME=/code/cache
|
| 20 |
+
# --- END: FINAL PERMISSION FIX ---
|
| 21 |
|
| 22 |
# Copy your application code into the container
|
| 23 |
COPY ./app /code/app
|