madankn79 commited on
Commit
3136b3a
·
1 Parent(s): de5f9d1

Initial Commit 5.1.0

Browse files
Files changed (3) hide show
  1. .huggingface.yaml +1 -0
  2. Dockerfile +7 -7
  3. requirements.txt +0 -1
.huggingface.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ sdk: docker
Dockerfile CHANGED
@@ -2,7 +2,7 @@ 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 \
@@ -11,15 +11,15 @@ RUN apt-get update && apt-get install -y \
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"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install OS dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  tesseract-ocr \
 
11
  texlive \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Install LaTeX-OCR manually
15
+ RUN git clone https://github.com/lukas-blecher/LaTeX-OCR.git /opt/latexocr && \
16
+ pip install /opt/latexocr
17
 
18
+ # Copy code
19
  COPY . .
20
 
21
+ # Install app dependencies
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+ # Run FastAPI app
25
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt CHANGED
@@ -7,6 +7,5 @@ pdf2image
7
  Pillow
8
  beautifulsoup4
9
  python-docx
10
- LaTeX-OCR
11
  torch
12
  transformers
 
7
  Pillow
8
  beautifulsoup4
9
  python-docx
 
10
  torch
11
  transformers