Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +5 -0
Dockerfile
CHANGED
@@ -2,6 +2,11 @@ FROM python:3.10-slim
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
# Install dependencies
|
6 |
COPY requirements.txt .
|
7 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# This ensures models are cached properly and don’t re-download every time
|
6 |
+
RUN mkdir /.cache && chmod 777 /.cache
|
7 |
+
ENV TRANSFORMERS_CACHE=/.cache
|
8 |
+
ENV HF_HOME=/.cache
|
9 |
+
|
10 |
# Install dependencies
|
11 |
COPY requirements.txt .
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|