marcosremar2 commited on
Commit
dbf9b27
·
1 Parent(s): 2751dee

Update PDF to Markdown converter API with NVIDIA L4 support

Browse files
Files changed (2) hide show
  1. Dockerfile +7 -3
  2. requirements.txt +3 -2
Dockerfile CHANGED
@@ -31,12 +31,16 @@ WORKDIR /app
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.0+cu118 torchvision==0.20.0+cu118 torchaudio==2.5.0+cu118 --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
 
31
  # Copy requirements first
32
  COPY requirements.txt .
33
 
34
+ # Install PyTorch dependencies with specific versions known to work with transformers
35
+ # Using torch 2.0.1 with compatible torchvision 0.15.2 which is a proven stable combination
36
  RUN pip install --no-cache-dir --upgrade pip && \
37
+ pip install --no-cache-dir torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
38
+
39
+ # Ensure transformers is pinned to a compatible version
40
+ RUN pip install --no-cache-dir transformers==4.30.2
41
 
42
  # Install remaining Python dependencies
43
+ RUN grep -v "torch\|torchvision\|torchaudio\|transformers" requirements.txt > requirements_no_torch.txt && \
44
  pip install --no-cache-dir -r requirements_no_torch.txt
45
 
46
  # Create output directories
requirements.txt CHANGED
@@ -3,6 +3,7 @@ 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
 
 
3
  python-multipart==0.0.6
4
  marker-pdf==1.6.2
5
  # Torch packages are installed directly in Dockerfile
6
+ # torch==2.0.1
7
  # torchvision==0.15.2
8
+ # torchaudio==2.0.2
9
+ # transformers==4.30.2