maahi2412 commited on
Commit
40d7302
·
verified ·
1 Parent(s): dcf99ec

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +25 -8
dockerfile CHANGED
@@ -1,14 +1,31 @@
1
- FROM python:3.8-slim
2
- WORKDIR /app
3
- RUN apt-get update && apt-get install -y \
4
- tesseract-ocr libtesseract-dev poppler-utils \
5
- && rm -rf /var/lib/apt/lists/*
6
- COPY . /app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  RUN pip install --no-cache-dir \
8
  flask flask-cors pdfplumber pillow pytesseract numpy torch transformers scikit-learn gunicorn sentencepiece
9
  RUN mkdir -p /app/uploads && chmod -R 777 /app/uploads
10
  COPY fine_tuned_pegasus /app/fine_tuned_pegasus
11
  COPY fine_tuned_bert /app/fine_tuned_bert
12
  COPY fine_tuned_legalbert /app/fine_tuned_legalbert
13
- EXPOSE 5000
14
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
 
 
1
+ # FROM python:3.9-slim
2
+
3
+ # RUN apt-get update && apt-get install -y \
4
+ # libpng-dev \
5
+ # libjpeg-dev \
6
+ # zlib1g-dev \
7
+ # tesseract-ocr \
8
+ # libtesseract-dev \
9
+ # && rm -rf /var/lib/apt/lists/*
10
+
11
+ # RUN useradd -m -u 1000 user
12
+ # USER user
13
+ # ENV PATH="/home/user/.local/bin:$PATH"
14
+
15
+ # WORKDIR /app
16
+
17
+ # COPY --chown=user:user requirements.txt requirements.txt
18
+ # RUN pip install --no-cache-dir --upgrade pip && \
19
+ # pip install --no-cache-dir -r requirements.txt
20
+
21
+ # COPY --chown=user:user . /app
22
  RUN pip install --no-cache-dir \
23
  flask flask-cors pdfplumber pillow pytesseract numpy torch transformers scikit-learn gunicorn sentencepiece
24
  RUN mkdir -p /app/uploads && chmod -R 777 /app/uploads
25
  COPY fine_tuned_pegasus /app/fine_tuned_pegasus
26
  COPY fine_tuned_bert /app/fine_tuned_bert
27
  COPY fine_tuned_legalbert /app/fine_tuned_legalbert
28
+ # EXPOSE 7860
29
+
30
+ # # Increase timeout and reduce workers
31
+ # CMD ["gunicorn", "--workers", "1", "--timeout", "600", "--bind", "0.0.0.0:7860", "app:app"]