Spaces:
Sleeping
Sleeping
Commit ·
6ba9cad
1
Parent(s): a4ae348
Resolving docker error
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -9,13 +9,13 @@ RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 libsm6 libxext6 &&
|
|
| 9 |
# Set the working directory inside the container
|
| 10 |
WORKDIR /code
|
| 11 |
|
| 12 |
-
# Set
|
| 13 |
-
ENV DOCTR_CACHE_DIR=".cache/doctr"
|
|
|
|
| 14 |
|
| 15 |
-
# -
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
# --- END OF NEW LINE ---
|
| 19 |
|
| 20 |
# Copy the requirements file and install packages
|
| 21 |
COPY requirements.txt .
|
|
|
|
| 9 |
# Set the working directory inside the container
|
| 10 |
WORKDIR /code
|
| 11 |
|
| 12 |
+
# Set writable cache directories for ALL model libraries
|
| 13 |
+
ENV DOCTR_CACHE_DIR="/code/.cache/doctr"
|
| 14 |
+
ENV HF_HOME="/code/.cache/huggingface"
|
| 15 |
|
| 16 |
+
# Pre-create all cache directories and make them writable
|
| 17 |
+
RUN mkdir -p /code/.cache/doctr /code/.cache/huggingface && \
|
| 18 |
+
chmod 777 -R /code/.cache
|
|
|
|
| 19 |
|
| 20 |
# Copy the requirements file and install packages
|
| 21 |
COPY requirements.txt .
|