marcosremar2 commited on
Commit
8c58924
·
1 Parent(s): 021d7a4

Update PDF to Markdown converter API with NVIDIA L4 support

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -3
  2. requirements.txt +5 -4
Dockerfile CHANGED
@@ -31,10 +31,13 @@ WORKDIR /app
31
  # Copy requirements first
32
  COPY requirements.txt .
33
 
34
- # Install Python dependencies
35
  RUN pip install --no-cache-dir --upgrade pip && \
36
- pip install --no-cache-dir -r requirements.txt && \
37
- pip install --no-cache-dir torch==2.5.1+cu118 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
 
 
 
38
 
39
  # Create output directories
40
  RUN mkdir -p /app/output/images && \
 
31
  # Copy requirements first
32
  COPY requirements.txt .
33
 
34
+ # Install PyTorch dependencies first
35
  RUN pip install --no-cache-dir --upgrade pip && \
36
+ pip install --no-cache-dir torch==2.5.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2 --extra-index-url https://download.pytorch.org/whl/cu118
37
+
38
+ # Install remaining Python dependencies
39
+ RUN grep -v "torch\|torchvision\|torchaudio" requirements.txt > requirements_no_torch.txt && \
40
+ pip install --no-cache-dir -r requirements_no_torch.txt
41
 
42
  # Create output directories
43
  RUN mkdir -p /app/output/images && \
requirements.txt CHANGED
@@ -1,7 +1,8 @@
1
  fastapi==0.104.1
2
  uvicorn==0.23.2
3
  python-multipart==0.0.6
4
- marker-pdf==1.2.4
5
- torch==2.5.1
6
- torchvision==0.15.2
7
- torchaudio==2.0.2
 
 
1
  fastapi==0.104.1
2
  uvicorn==0.23.2
3
  python-multipart==0.0.6
4
+ marker-pdf==1.6.2
5
+ # Torch packages are installed directly in Dockerfile
6
+ # torch==2.5.1
7
+ # torchvision==0.15.2
8
+ # torchaudio==2.0.2