Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -0
Dockerfile
CHANGED
|
@@ -6,12 +6,17 @@ WORKDIR /app
|
|
| 6 |
|
| 7 |
# Set environment variables
|
| 8 |
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Install system dependencies
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
git \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
# Copy requirements file and install dependencies
|
| 16 |
COPY requirements.txt .
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 6 |
|
| 7 |
# Set environment variables
|
| 8 |
ENV PYTHONUNBUFFERED=1
|
| 9 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
| 10 |
+
ENV HF_HOME=/app/cache
|
| 11 |
|
| 12 |
# Install system dependencies
|
| 13 |
RUN apt-get update && apt-get install -y \
|
| 14 |
git \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
+
# Create cache directory and set permissions
|
| 18 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 19 |
+
|
| 20 |
# Copy requirements file and install dependencies
|
| 21 |
COPY requirements.txt .
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|