roshcheeku commited on
Commit
7f2c376
·
verified ·
1 Parent(s): 9588ec0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -23
Dockerfile CHANGED
@@ -1,37 +1,17 @@
1
- # Use official Python slim image (CPU-only)
2
  FROM python:3.10-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Create cache and .streamlit folders with proper permissions
8
- RUN mkdir -p /app/cache && chmod -R 777 /app/cache
9
- RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit
10
-
11
- # Set environment variable for Streamlit home directory
12
- ENV STREAMLIT_HOME=/app/.streamlit
13
-
14
- # Upgrade pip and install system dependencies needed for pdfplumber, python-docx, openpyxl
15
  RUN apt-get update && apt-get install -y \
16
- build-essential \
17
- poppler-utils \
18
- libglib2.0-0 \
19
- libmagic1 \
20
  && rm -rf /var/lib/apt/lists/*
21
 
22
- # Copy requirements and install dependencies
23
  COPY requirements.txt .
24
  RUN pip install --no-cache-dir --upgrade pip
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
- # Copy app files
28
  COPY app.py model_utils.py ./
29
 
30
- # Create uploads folder
31
- RUN mkdir uploads && chmod -R 777 uploads
32
-
33
- # Expose port for Streamlit (default 8501)
34
- EXPOSE 8501
35
 
36
- # Run Streamlit app
37
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
 
5
  RUN apt-get update && apt-get install -y \
6
+ build-essential poppler-utils libglib2.0-0 libmagic1 \
 
 
 
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir --upgrade pip
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
13
  COPY app.py model_utils.py ./
14
 
15
+ EXPOSE 7860
 
 
 
 
16
 
17
+ CMD ["python", "app.py"]