Anupam007 commited on
Commit
e11eccf
·
verified ·
1 Parent(s): b7c11d4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -15,15 +15,17 @@ COPY requirements.txt .
15
  COPY app.py .
16
  COPY README.md .
17
 
18
- # Create /data directory
19
- RUN mkdir -p /data && chmod -R 777 /data
20
 
21
  # Install Python dependencies
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
 
 
 
24
  # Expose port
25
  EXPOSE 7860
26
 
27
  # Run the Gradio app
28
- CMD ["python", "app.py"]
29
- RUN mkdir -p /data && chmod -R 777 /data
 
15
  COPY app.py .
16
  COPY README.md .
17
 
18
+ # Create /data and /data/files directories with permissions
19
+ RUN mkdir -p /data/files /data/nltk_data && chmod -R 777 /data
20
 
21
  # Install Python dependencies
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+ # Pre-download NLTK data
25
+ RUN python -m nltk.downloader -d /data/nltk_data punkt stopwords
26
+
27
  # Expose port
28
  EXPOSE 7860
29
 
30
  # Run the Gradio app
31
+ CMD ["python", "app.py"]