Rulga commited on
Commit
0b14128
·
1 Parent(s): 015d69d

Update Dockerfile to create cache directory and set environment variables for transformers

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -9,9 +9,14 @@ RUN apt-get update && apt-get install -y \
9
  software-properties-common \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Create directory for vector store and set permissions
13
- RUN mkdir -p /app/vector_store /app/chat_history && \
14
- chmod 777 /app/vector_store /app/chat_history
 
 
 
 
 
15
 
16
  # Copy requirements first to leverage Docker cache
17
  COPY requirements.txt .
 
9
  software-properties-common \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create directories and set permissions
13
+ RUN mkdir -p /app/vector_store /app/chat_history /app/.cache && \
14
+ chmod 777 /app/vector_store /app/chat_history /app/.cache
15
+
16
+ # Set environment variables
17
+ ENV TRANSFORMERS_CACHE=/app/.cache
18
+ ENV HF_HOME=/app/.cache
19
+ ENV XDG_CACHE_HOME=/app/.cache
20
 
21
  # Copy requirements first to leverage Docker cache
22
  COPY requirements.txt .