Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -0
Dockerfile
CHANGED
@@ -13,6 +13,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
13 |
COPY requirements.txt .
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Copy the entire application
|
17 |
COPY . .
|
18 |
|
|
|
13 |
COPY requirements.txt .
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
+
# Set a writable cache directory for Hugging Face models
|
17 |
+
ENV HF_HOME=/app/hf_cache
|
18 |
+
RUN mkdir -p /app/hf_cache
|
19 |
+
|
20 |
+
# Pre-download T5-Base model and tokenizer
|
21 |
+
RUN python -c "from transformers import T5Tokenizer, T5ForConditionalGeneration; T5Tokenizer.from_pretrained('t5-base'); T5ForConditionalGeneration.from_pretrained('t5-base')"
|
22 |
+
|
23 |
# Copy the entire application
|
24 |
COPY . .
|
25 |
|