Update Dockerfile
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
@@ -8,6 +8,14 @@ RUN apt-get update && apt-get install -y \
|
|
8 |
git \
|
9 |
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
# Copy requirements first for better caching
|
12 |
COPY requirements.txt .
|
13 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
8 |
git \
|
9 |
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
+
# Create cache directories with proper permissions
|
12 |
+
RUN mkdir -p /cache /config && chmod 777 /cache /config
|
13 |
+
|
14 |
+
# Set environment variables to use the writable directories
|
15 |
+
ENV TRANSFORMERS_CACHE=/cache/huggingface
|
16 |
+
ENV HF_HOME=/cache/huggingface
|
17 |
+
ENV MPLCONFIGDIR=/config/matplotlib
|
18 |
+
|
19 |
# Copy requirements first for better caching
|
20 |
COPY requirements.txt .
|
21 |
RUN pip install --no-cache-dir -r requirements.txt
|