amanm10000 commited on
Commit
02c63da
·
1 Parent(s): deef937
Files changed (1) hide show
  1. Dockerfile +18 -3
Dockerfile CHANGED
@@ -5,18 +5,33 @@ FROM python:3.10-slim
5
  WORKDIR /app
6
 
7
  # Install system dependencies
8
- RUN apt-get update && apt-get install -y \
 
9
  build-essential \
10
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
11
 
12
  # Copy all application files
13
  COPY . .
 
14
 
15
  # Install Python dependencies
16
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
17
 
18
  # Expose the port the app runs on
19
  EXPOSE 7860
20
 
 
 
 
21
  # Command to run the application
22
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
5
  WORKDIR /app
6
 
7
  # Install system dependencies
8
+ RUN echo "Installing system dependencies..." && \
9
+ apt-get update && apt-get install -y \
10
  build-essential \
11
+ && rm -rf /var/lib/apt/lists/* && \
12
+ echo "System dependencies installed successfully!"
13
+
14
+ # Create NLTK data directory and set permissions
15
+ RUN mkdir -p /nltk_data && \
16
+ chmod 777 /nltk_data
17
 
18
  # Copy all application files
19
  COPY . .
20
+ RUN echo "Application files copied successfully!"
21
 
22
  # Install Python dependencies
23
+ RUN echo "Installing Python dependencies..." && \
24
+ pip install --no-cache-dir -r requirements.txt && \
25
+ echo "Python dependencies installed successfully!"
26
+
27
+ # Download NLTK data
28
+ RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', quiet=True)"
29
 
30
  # Expose the port the app runs on
31
  EXPOSE 7860
32
 
33
+ # Show directory contents before running the application
34
+ RUN echo "Contents of working directory:" && ls -la
35
+
36
  # Command to run the application
37
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]