Spaces:
Sleeping
Sleeping
Commit
·
071117a
1
Parent(s):
1dc4e4c
Fix cache directory permissions for model downloading
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
|
@@ -6,6 +6,12 @@ RUN apt-get update && apt-get install -y \
|
|
| 6 |
build-essential \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 6 |
build-essential \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
|
| 10 |
+
|
| 11 |
+
ENV HF_HOME=/app/.cache
|
| 12 |
+
ENV TRANSFORMERS_CACHE=/app/.cache/transformers
|
| 13 |
+
ENV SENTENCE_TRANSFORMERS_HOME=/app/.cache/sentence-transformers
|
| 14 |
+
|
| 15 |
COPY requirements.txt .
|
| 16 |
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|