Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
|
@@ -25,15 +25,19 @@ RUN apt-get update && apt-get install -y \
|
|
| 25 |
WORKDIR /app
|
| 26 |
|
| 27 |
# Create cache directories with proper permissions
|
| 28 |
-
RUN mkdir -p /app/cache /tmp/.wdm /tmp/chrome-data && \
|
| 29 |
chmod -R 777 /app/cache /tmp/.wdm /tmp/chrome-data
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
# Copy requirements first to leverage Docker cache
|
| 32 |
COPY requirements.txt .
|
| 33 |
|
| 34 |
# Update pip and install dependencies
|
| 35 |
RUN pip install --upgrade pip && \
|
| 36 |
-
pip install -
|
| 37 |
pip install tokenizers==0.19.1
|
| 38 |
|
| 39 |
# Verify transformers and tokenizers
|
|
|
|
| 25 |
WORKDIR /app
|
| 26 |
|
| 27 |
# Create cache directories with proper permissions
|
| 28 |
+
RUN mkdir -p /app/cache/pip /tmp/.wdm /tmp/chrome-data && \
|
| 29 |
chmod -R 777 /app/cache /tmp/.wdm /tmp/chrome-data
|
| 30 |
|
| 31 |
+
# Set pip cache directory
|
| 32 |
+
ENV XDG_CACHE_HOME=/app/cache/pip
|
| 33 |
+
ENV PIP_NO_CACHE_DIR=1 # Disable pip cache to avoid permission issues
|
| 34 |
+
|
| 35 |
# Copy requirements first to leverage Docker cache
|
| 36 |
COPY requirements.txt .
|
| 37 |
|
| 38 |
# Update pip and install dependencies
|
| 39 |
RUN pip install --upgrade pip && \
|
| 40 |
+
pip install -r requirements.txt && \
|
| 41 |
pip install tokenizers==0.19.1
|
| 42 |
|
| 43 |
# Verify transformers and tokenizers
|