fasdfsa commited on
Commit
04843eb
·
1 Parent(s): 78519da

torch 不用装也可以

Browse files
Files changed (2) hide show
  1. main_v6.py +10 -6
  2. readme.txt +3 -0
main_v6.py CHANGED
@@ -10,13 +10,16 @@
10
  """
11
 
12
  .venv/Scripts/python post.py
 
13
  测试接口
14
 
15
  curl -LsSf https://astral.sh/uv/install.sh | sh
16
- # On Windows.
17
  powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
 
18
 
19
  apt-get update && apt-get install -y libgl1-mesa-glx libglib2.0-0 libgl1 libglib2.0-0t64
 
20
 
21
  uv venv --python 3.10 --seed --clear
22
 
@@ -30,8 +33,8 @@ CPU 版本:
30
  .venv/Scripts/pip install "paddleocr[all]"
31
  .venv/bin/pip install "paddleocr[all]"
32
 
33
- .venv/Scripts/pip install transformers torch --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
34
- .venv/bin/pip install transformers torch --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
35
 
36
  .venv/Scripts/pip install paddlepaddle -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
37
  .venv/bin/pip install paddlepaddle -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
@@ -44,12 +47,13 @@ GPU 版本:
44
  .venv/bin/pip install "paddleocr[all]"
45
 
46
  .venv/Scripts/pip install paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/stable/cu130/
47
- .venv/bin/pip install paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/stable/cu130/
48
 
49
- .venv/Scripts/pip install transformers torch --index-url https://download.pytorch.org/whl/cu130 --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
50
- .venv/bin/pip install transformers torch --index-url https://download.pytorch.org/whl/cu130 --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
51
 
52
  .venv/Scripts/pip install flask
 
53
 
54
  """
55
 
 
10
  """
11
 
12
  .venv/Scripts/python post.py
13
+ .venv/bin/python post.py
14
  测试接口
15
 
16
  curl -LsSf https://astral.sh/uv/install.sh | sh
17
+ # linux
18
  powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
19
+ # Windows.
20
 
21
  apt-get update && apt-get install -y libgl1-mesa-glx libglib2.0-0 libgl1 libglib2.0-0t64
22
+ # linux
23
 
24
  uv venv --python 3.10 --seed --clear
25
 
 
33
  .venv/Scripts/pip install "paddleocr[all]"
34
  .venv/bin/pip install "paddleocr[all]"
35
 
36
+ .venv/Scripts/pip install transformers --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
37
+ .venv/bin/pip install transformers --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
38
 
39
  .venv/Scripts/pip install paddlepaddle -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
40
  .venv/bin/pip install paddlepaddle -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
 
47
  .venv/bin/pip install "paddleocr[all]"
48
 
49
  .venv/Scripts/pip install paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/stable/cu130/
50
+ .venv/bin/pip install paddlepaddle-gpu==3.3.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu130/
51
 
52
+ .venv/Scripts/pip install transformers --index-url https://download.pytorch.org/whl/cu130 --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
53
+ .venv/bin/pip install transformers --index-url https://download.pytorch.org/whl/cu130 --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
54
 
55
  .venv/Scripts/pip install flask
56
+ .venv/bin/pip install flask
57
 
58
  """
59
 
readme.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  ## 根因
2
  PyTorch 和 PaddlePaddle 各自内置了不同版本的 cuDNN 9 DLL ,两者的文件大小不同(不同子版本),不能在同一进程中共存:
3
 
 
1
+
2
+ torch 不用装也可以
3
+
4
  ## 根因
5
  PyTorch 和 PaddlePaddle 各自内置了不同版本的 cuDNN 9 DLL ,两者的文件大小不同(不同子版本),不能在同一进程中共存:
6