Ronochieng commited on
Commit
9e3c676
·
verified ·
1 Parent(s): 034eb8b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -20,9 +20,18 @@ COPY requirements.txt .
20
  # Install Python dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
 
 
 
 
 
 
23
  # Copy the rest of the application
24
  COPY . .
25
 
 
 
 
26
  # Expose the port Streamlit runs on
27
  EXPOSE 7860
28
 
 
20
  # Install Python dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
+ # Pre-download NLTK data
24
+ RUN python -m nltk.downloader punkt averaged_perceptron_tagger stopwords words wordnet omw-1.4
25
+
26
+ # Create directory for NLTK data with proper permissions
27
+ RUN mkdir -p /usr/local/share/nltk_data && chmod 777 /usr/local/share/nltk_data
28
+
29
  # Copy the rest of the application
30
  COPY . .
31
 
32
+ # Set environment variable to specify NLTK data path
33
+ ENV NLTK_DATA=/usr/local/share/nltk_data
34
+
35
  # Expose the port Streamlit runs on
36
  EXPOSE 7860
37