pvanand commited on
Commit
b0f97ff
1 Parent(s): 6f91d5c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -10,8 +10,14 @@ COPY . /app
10
  # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
 
 
 
 
 
13
  # Run the script to download NLTK data
14
  RUN python /app/download_nltk_data.py
15
 
16
  # Start the FastAPI app on port 7860, the default port expected by Spaces
17
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
10
  # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Create a directory for NLTK data and set permissions
14
+ RUN mkdir -p /app/nltk_data && chmod -R 755 /app/nltk_data
15
+
16
+ # Set the NLTK_DATA environment variable
17
+ ENV NLTK_DATA=/app/nltk_data
18
+
19
  # Run the script to download NLTK data
20
  RUN python /app/download_nltk_data.py
21
 
22
  # Start the FastAPI app on port 7860, the default port expected by Spaces
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]