ftshijt commited on
Commit
9cdf2c6
·
1 Parent(s): 6e83f48

update the process with permission

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. app.py +1 -1
Dockerfile CHANGED
@@ -58,7 +58,7 @@ EXPOSE 7860
58
 
59
  # Set environment variables
60
  ENV GRADIO_SERVER_NAME="0.0.0.0"
61
- ENV NLTK_DATA=/usr/local/share/nltk_data
62
  ENV PYTHONUNBUFFERED=1
63
  ENV HF_HOME=$HOME/.cache/huggingface
64
  # Disable token verification for huggingface models
 
58
 
59
  # Set environment variables
60
  ENV GRADIO_SERVER_NAME="0.0.0.0"
61
+ ENV NLTK_DATA=$HOME/local/share/nltk_data
62
  ENV PYTHONUNBUFFERED=1
63
  ENV HF_HOME=$HOME/.cache/huggingface
64
  # Disable token verification for huggingface models
app.py CHANGED
@@ -12,7 +12,7 @@ import time
12
  from pathlib import Path
13
 
14
  # Set NLTK data directory - use the environment variable or default to a writable location
15
- nltk_data_dir = os.environ.get("NLTK_DATA", "/usr/local/share/nltk_data")
16
  os.environ["NLTK_DATA"] = nltk_data_dir
17
  os.makedirs(nltk_data_dir, exist_ok=True)
18
  print(f"NLTK data directory set to: {nltk_data_dir}")
 
12
  from pathlib import Path
13
 
14
  # Set NLTK data directory - use the environment variable or default to a writable location
15
+ nltk_data_dir = os.environ.get("NLTK_DATA", "/home/user/local/share/nltk_data")
16
  os.environ["NLTK_DATA"] = nltk_data_dir
17
  os.makedirs(nltk_data_dir, exist_ok=True)
18
  print(f"NLTK data directory set to: {nltk_data_dir}")