madankn79 commited on
Commit
de5f9d1
·
1 Parent(s): 620392e

Initial Commit 5.1.0

Browse files
Files changed (2) hide show
  1. Dockerfile +13 -11
  2. requirements.txt +0 -1
Dockerfile CHANGED
@@ -1,23 +1,25 @@
1
  FROM python:3.10-slim
2
 
3
- # Set working directory
4
  WORKDIR /app
5
 
6
- # Copy files into container
7
- COPY . .
8
-
9
- # Install required system packages (git, poppler-utils, tesseract, LaTeX, etc.)
10
  RUN apt-get update && apt-get install -y \
11
  git \
12
- poppler-utils \
13
  tesseract-ocr \
14
- texlive \
15
  libgl1 \
16
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
17
 
18
- # Install Python packages
19
- RUN pip install --upgrade pip
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # Start the FastAPI app
23
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
 
 
 
6
  RUN apt-get update && apt-get install -y \
7
  git \
 
8
  tesseract-ocr \
9
+ poppler-utils \
10
  libgl1 \
11
+ texlive \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Clone LaTeX-OCR and install it manually
15
+ RUN git clone https://github.com/lukas-blecher/LaTeX-OCR.git /opt/latexocr \
16
+ && pip install /opt/latexocr
17
+
18
+ # Copy project files
19
+ COPY . .
20
 
21
+ # Install other Python dependencies
 
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+ # Start FastAPI app
25
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt CHANGED
@@ -10,4 +10,3 @@ python-docx
10
  LaTeX-OCR
11
  torch
12
  transformers
13
- git+https://github.com/lukas-blecher/LaTeX-OCR.git
 
10
  LaTeX-OCR
11
  torch
12
  transformers