Spaces:
Running
Running
Upload Dockerfile
Browse files- Dockerfile +5 -0
Dockerfile
CHANGED
@@ -6,6 +6,11 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
|
6 |
ENV PYTHONUNBUFFERED 1
|
7 |
# Allow statements and log messages to immediately appear in the Knative logs
|
8 |
ENV PYTHONIOENCODING=utf-8
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Set the working directory in the container
|
11 |
WORKDIR /app
|
|
|
6 |
ENV PYTHONUNBUFFERED 1
|
7 |
# Allow statements and log messages to immediately appear in the Knative logs
|
8 |
ENV PYTHONIOENCODING=utf-8
|
9 |
+
# Set cache directory for Hugging Face libraries to a writable location
|
10 |
+
ENV HF_HOME=/app/.cache/huggingface
|
11 |
+
ENV TRANSFORMERS_CACHE=/app/.cache/transformers
|
12 |
+
# Create the cache directory (optional, libraries might create it, but good practice)
|
13 |
+
# RUN mkdir -p /app/.cache && chown -R <user>:<group> /app/.cache # Might need user/group if not running as root
|
14 |
|
15 |
# Set the working directory in the container
|
16 |
WORKDIR /app
|