Timmyafolami commited on
Commit
43b2c85
·
verified ·
1 Parent(s): 816b706

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -13,13 +13,17 @@ RUN pip install --no-cache-dir -r requirements.txt
13
  # Copy the current directory contents into the container at /app
14
  COPY . /app
15
 
16
- # Create the logs directory and set permissions
17
  RUN mkdir -p /app/logs && chmod -R 777 /app/logs
 
 
 
 
18
 
19
  # Download NLTK data
20
- RUN python -c "import nltk; nltk.download('stopwords'); nltk.download('wordnet')"
21
 
22
- # Make port 8000 available to the world outside this container
23
  EXPOSE 7860
24
 
25
  # Run the entrypoint script
 
13
  # Copy the current directory contents into the container at /app
14
  COPY . /app
15
 
16
+ # Create the logs and nltk_data directories and set permissions
17
  RUN mkdir -p /app/logs && chmod -R 777 /app/logs
18
+ RUN mkdir -p /app/nltk_data && chmod -R 777 /app/nltk_data
19
+
20
+ # Set the NLTK_DATA environment variable
21
+ ENV NLTK_DATA=/app/nltk_data
22
 
23
  # Download NLTK data
24
+ RUN python -c "import nltk; nltk.download('stopwords', download_dir='/app/nltk_data'); nltk.download('wordnet', download_dir='/app/nltk_data')"
25
 
26
+ # Make port 7860 available to the world outside this container
27
  EXPOSE 7860
28
 
29
  # Run the entrypoint script