Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +1 -4
Dockerfile
CHANGED
|
@@ -6,16 +6,13 @@ RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
|
|
| 6 |
# Set working directory
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
-
# Create a local cache dir for HuggingFace models
|
| 10 |
-
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface
|
| 11 |
-
ENV HF_HOME=/app/.cache/huggingface
|
| 12 |
-
|
| 13 |
# Copy source files
|
| 14 |
COPY . /app
|
| 15 |
|
| 16 |
# Install Python packages
|
| 17 |
RUN pip install --no-cache-dir --upgrade pip
|
| 18 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 19 |
|
| 20 |
# Preload model into cache
|
| 21 |
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
|
|
|
|
| 6 |
# Set working directory
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# Copy source files
|
| 10 |
COPY . /app
|
| 11 |
|
| 12 |
# Install Python packages
|
| 13 |
RUN pip install --no-cache-dir --upgrade pip
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
+
RUN chmod -R 777 /app/.cache
|
| 16 |
|
| 17 |
# Preload model into cache
|
| 18 |
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
|