phaethon-order commited on
Commit
3a4d792
·
unverified ·
1 Parent(s): 99684e9

Update cache directory paths to use a unified /data/cache structure

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. infrastructure/database.py +1 -1
Dockerfile CHANGED
@@ -38,9 +38,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
38
  PIP_DISABLE_PIP_VERSION_CHECK=1 \
39
  PORT=7860 \
40
  PERSIST_DIRECTORY=/data/chroma \
41
- HF_HOME=/data/.cache/huggingface \
42
- TRANSFORMERS_CACHE=/data/.cache/hf \
43
- XDG_CACHE_HOME=/data/.cache
44
 
45
  WORKDIR /app
46
 
 
38
  PIP_DISABLE_PIP_VERSION_CHECK=1 \
39
  PORT=7860 \
40
  PERSIST_DIRECTORY=/data/chroma \
41
+ HF_HOME=/data/cache/huggingface \
42
+ TRANSFORMERS_CACHE=/data/cache/hf \
43
+ XDG_CACHE_HOME=/data/cache
44
 
45
  WORKDIR /app
46
 
infrastructure/database.py CHANGED
@@ -90,7 +90,7 @@ def _ensure_writable_caches(): # pragma: no cover (env specific)
90
  continue
91
 
92
  # Set cache related env vars if absent
93
- cache_base = os.path.join(os.environ.get("HOME", current_home), ".cache")
94
  for var in ["XDG_CACHE_HOME", "HF_HOME", "TRANSFORMERS_CACHE"]:
95
  if not os.getenv(var):
96
  try:
 
90
  continue
91
 
92
  # Set cache related env vars if absent
93
+ cache_base = os.path.join(os.environ.get("HOME", current_home), "/data/cache")
94
  for var in ["XDG_CACHE_HOME", "HF_HOME", "TRANSFORMERS_CACHE"]:
95
  if not os.getenv(var):
96
  try: