alozowski HF staff commited on
Commit
cb24abf
·
1 Parent(s): e14240c

Remove TRANSFORMERS_CACHE

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -1
  2. backend/app/core/cache.py +4 -4
Dockerfile CHANGED
@@ -49,7 +49,6 @@ WORKDIR /app
49
 
50
  # Environment variables
51
  ENV HF_HOME=/app/.cache \
52
- TRANSFORMERS_CACHE=/app/.cache \
53
  HF_DATASETS_CACHE=/app/.cache \
54
  INTERNAL_API_PORT=7861 \
55
  PORT=7860 \
 
49
 
50
  # Environment variables
51
  ENV HF_HOME=/app/.cache \
 
52
  HF_DATASETS_CACHE=/app/.cache \
53
  INTERNAL_API_PORT=7861 \
54
  PORT=7860 \
backend/app/core/cache.py CHANGED
@@ -3,7 +3,7 @@ import shutil
3
  from pathlib import Path
4
  from datetime import timedelta
5
  import logging
6
- from app.utils.logging import LogFormatter
7
  from app.config.base import (
8
  CACHE_ROOT,
9
  DATASETS_CACHE,
@@ -58,16 +58,16 @@ class CacheConfig:
58
  def _setup_environment(self):
59
  """Configure HuggingFace environment variables"""
60
  logger.info(LogFormatter.subsection("ENVIRONMENT SETUP"))
61
-
62
  env_vars = {
63
  "HF_HOME": str(self.cache_root),
64
- "TRANSFORMERS_CACHE": str(self.models_cache),
65
  "HF_DATASETS_CACHE": str(self.datasets_cache)
66
  }
67
-
68
  for var, value in env_vars.items():
69
  os.environ[var] = value
70
  logger.info(LogFormatter.info(f"Set {var}={value}"))
 
71
 
72
  def get_cache_path(self, cache_type: str) -> Path:
73
  """Returns the path for a specific cache type"""
 
3
  from pathlib import Path
4
  from datetime import timedelta
5
  import logging
6
+ from app.core.formatting import LogFormatter
7
  from app.config.base import (
8
  CACHE_ROOT,
9
  DATASETS_CACHE,
 
58
  def _setup_environment(self):
59
  """Configure HuggingFace environment variables"""
60
  logger.info(LogFormatter.subsection("ENVIRONMENT SETUP"))
61
+
62
  env_vars = {
63
  "HF_HOME": str(self.cache_root),
 
64
  "HF_DATASETS_CACHE": str(self.datasets_cache)
65
  }
66
+
67
  for var, value in env_vars.items():
68
  os.environ[var] = value
69
  logger.info(LogFormatter.info(f"Set {var}={value}"))
70
+
71
 
72
  def get_cache_path(self, cache_type: str) -> Path:
73
  """Returns the path for a specific cache type"""