Spaces:
Sleeping
Sleeping
Commit
·
8c58924
1
Parent(s):
021d7a4
Update PDF to Markdown converter API with NVIDIA L4 support
Browse files- Dockerfile +6 -3
- requirements.txt +5 -4
Dockerfile
CHANGED
@@ -31,10 +31,13 @@ WORKDIR /app
|
|
31 |
# Copy requirements first
|
32 |
COPY requirements.txt .
|
33 |
|
34 |
-
# Install
|
35 |
RUN pip install --no-cache-dir --upgrade pip && \
|
36 |
-
pip install --no-cache-dir
|
37 |
-
|
|
|
|
|
|
|
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
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
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
|