Spaces:
Sleeping
Sleeping
Commit ·
2a741d4
1
Parent(s): 5c7d19e
fix: Add writable permissions for ChromaDB directory
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -10,14 +10,15 @@ 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 |
-
# --- START: FINAL PERMISSION
|
| 14 |
-
# Create a writable
|
| 15 |
-
# This allows any user (including the one running the app) to write to it.
|
| 16 |
RUN mkdir -p /code/cache && chmod 777 /code/cache
|
| 17 |
-
#
|
|
|
|
|
|
|
| 18 |
ENV HF_HOME=/code/cache
|
| 19 |
ENV SENTENCE_TRANSFORMERS_HOME=/code/cache
|
| 20 |
-
# --- END: FINAL PERMISSION
|
| 21 |
|
| 22 |
# Copy your application code into the container
|
| 23 |
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 FIXES ---
|
| 14 |
+
# Create a writable directory for model caches
|
|
|
|
| 15 |
RUN mkdir -p /code/cache && chmod 777 /code/cache
|
| 16 |
+
# Create a writable directory for the vector database
|
| 17 |
+
RUN mkdir -p /code/app/chroma_db && chmod -R 777 /code/app/chroma_db
|
| 18 |
+
# Tell all Hugging Face libraries to use the new cache directory
|
| 19 |
ENV HF_HOME=/code/cache
|
| 20 |
ENV SENTENCE_TRANSFORMERS_HOME=/code/cache
|
| 21 |
+
# --- END: FINAL PERMISSION FIXES ---
|
| 22 |
|
| 23 |
# Copy your application code into the container
|
| 24 |
COPY ./app /code/app
|