taprosoft
commited on
Commit
·
1ae7633
1
Parent(s):
44f7c24
fix: add pip upgrade
Browse files- Dockerfile +1 -1
- backends/smoldocling.py +0 -1
- requirements.txt +0 -1
Dockerfile
CHANGED
@@ -31,7 +31,7 @@ ENV HOME=/home/user \
|
|
31 |
PYTHONUNBUFFERED=1 \
|
32 |
GRADIO_SERVER_NAME=0.0.0.0
|
33 |
|
34 |
-
RUN pip3 install --
|
35 |
|
36 |
# Set the working directory to the user's home directory
|
37 |
WORKDIR $HOME/app
|
|
|
31 |
PYTHONUNBUFFERED=1 \
|
32 |
GRADIO_SERVER_NAME=0.0.0.0
|
33 |
|
34 |
+
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
35 |
|
36 |
# Set the working directory to the user's home directory
|
37 |
WORKDIR $HOME/app
|
backends/smoldocling.py
CHANGED
@@ -18,7 +18,6 @@ processor = AutoProcessor.from_pretrained("ds4sd/SmolDocling-256M-preview")
|
|
18 |
model = AutoModelForVision2Seq.from_pretrained(
|
19 |
"ds4sd/SmolDocling-256M-preview",
|
20 |
torch_dtype=torch.bfloat16,
|
21 |
-
_attn_implementation="flash_attention_2" if DEVICE == "cuda" else "eager",
|
22 |
).to(DEVICE)
|
23 |
|
24 |
# Create input messages
|
|
|
18 |
model = AutoModelForVision2Seq.from_pretrained(
|
19 |
"ds4sd/SmolDocling-256M-preview",
|
20 |
torch_dtype=torch.bfloat16,
|
|
|
21 |
).to(DEVICE)
|
22 |
|
23 |
# Create input messages
|
requirements.txt
CHANGED
@@ -10,4 +10,3 @@ transformers<5.0.0,>=4.45.2
|
|
10 |
pypdf
|
11 |
docling_core
|
12 |
opencv-contrib-python
|
13 |
-
flash_attn
|
|
|
10 |
pypdf
|
11 |
docling_core
|
12 |
opencv-contrib-python
|
|