Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker部署无法调用paddlex命令 #3593

Open
4 tasks done
BiFangKNT opened this issue Mar 13, 2025 · 7 comments
Open
4 tasks done

docker部署无法调用paddlex命令 #3593

BiFangKNT opened this issue Mar 13, 2025 · 7 comments
Assignees

Comments

@BiFangKNT
Copy link

BiFangKNT commented Mar 13, 2025

Checklist:

描述问题

按照官方文档docker部署,无法调用paddlex命令,也无法安装paddlex包

复现

  1. 服务化部署

跑不通

* 您在服务化部署中是否有使用高性能推理插件,如果是,您使用的是离线激活方式还是在线激活方式?

部署流程:

win10中启动docker:

C:\github\paddle>docker run --gpus all --name paddlex -v %CD%:/paddle --shm-size=8G --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0rc0-gpu-cuda12.3-cudnn9.0-trt8.6 /bin/bash

==========
== CUDA ==
==========

CUDA Version 12.3.1

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

docker中无法调用paddlex命令:

λ docker-desktop /paddle paddlex --install serving
bash: paddlex: command not found

也无法安装paddelx包:

λ docker-desktop /paddle pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0rc0-py3-none-any.whl
error: uninstall-distutils-installed-package

× Cannot uninstall PyYAML 5.3.1
╰─> It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
λ docker-desktop /paddle pip uninstall pyyaml
Found existing installation: PyYAML 5.3.1
error: uninstall-distutils-installed-package

× Cannot uninstall PyYAML 5.3.1
╰─> It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
  1. 请提供您出现的报错信息及相关log

环境

  1. 请提供您使用的PaddlePaddle、PaddleX版本号、Python版本号

官方docker镜像:ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0rc0-gpu-cuda12.3-cudnn9.0-trt8.6

  1. 请提供您使用的操作系统信息,如Linux/Windows/MacOS

win10专业版(19045.3448)

  1. 请问您使用的CUDA/cuDNN的版本号是?
C:\github\paddle>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:42:46_Pacific_Standard_Time_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_0

C:\github\paddle>nvidia-smi
Thu Mar 13 11:15:53 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 572.70                 Driver Version: 572.70         CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060      WDDM  |   00000000:01:00.0  On |                  N/A |
| 53%   42C    P8             16W /  170W |     910MiB /  12288MiB |     16%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A             932    C+G   ...IA app\CEF\NVIDIA Overlay.exe      N/A      |
|    0   N/A  N/A            3772    C+G   ...lication\ShadowBotBrowser.exe      N/A      |
|    0   N/A  N/A            4344    C+G   ...we\Microsoft.Media.Player.exe      N/A      |
|    0   N/A  N/A            6236    C+G   ...4__8wekyb3d8bbwe\Video.UI.exe      N/A      |
|    0   N/A  N/A            6612    C+G   ...ekyb3d8bbwe\CalculatorApp.exe      N/A      |
|    0   N/A  N/A            6740    C+G   ...xyewy\ShellExperienceHost.exe      N/A      |
|    0   N/A  N/A            7020    C+G   ...IA app\CEF\NVIDIA Overlay.exe      N/A      |
|    0   N/A  N/A            8308    C+G   C:\Windows\explorer.exe               N/A      |
|    0   N/A  N/A            9776    C+G   ...t\Edge\Application\msedge.exe      N/A      |
|    0   N/A  N/A           10600    C+G   ...erry Studio\Cherry Studio.exe      N/A      |
|    0   N/A  N/A           11080    C+G   ...8bbwe\PhoneExperienceHost.exe      N/A      |
|    0   N/A  N/A           11176    C+G   ...5n1h2txyewy\TextInputHost.exe      N/A      |
|    0   N/A  N/A           13976    C+G   ....0.3065.92\msedgewebview2.exe      N/A      |
|    0   N/A  N/A           14840    C+G   ...pp-4.0.433\RazerAppEngine.exe      N/A      |
|    0   N/A  N/A           16880    C+G   ...h_cw5n1h2txyewy\SearchApp.exe      N/A      |
|    0   N/A  N/A           17248    C+G   ...ram Files\Tencent\QQNT\QQ.exe      N/A      |
|    0   N/A  N/A           17472      C   ...al\Programs\Ollama\ollama.exe      N/A      |
|    0   N/A  N/A           18784    C+G   ...ntrolPanel\SystemSettings.exe      N/A      |
|    0   N/A  N/A           19288    C+G   ...ffice\root\Office16\EXCEL.EXE      N/A      |
|    0   N/A  N/A           19496    C+G   ...r\frontend\Docker Desktop.exe      N/A      |
|    0   N/A  N/A           20964    C+G   ...t\Edge\Application\msedge.exe      N/A      |
+-----------------------------------------------------------------------------------------+

C:\github\paddle>python
Python 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print("PyTorch version:", torch.__version__)
PyTorch version: 2.6.0+cu126
>>> print("CUDA is_available:", torch.cuda.is_available())
CUDA is_available: True
>>> if torch.cuda.is_available():
...     print("CUDA device name:", torch.cuda.get_device_name(0))
...     print("CUDA device capability:", torch.cuda.get_device_capability(0))
...     print("cuDNN version:", torch.backends.cudnn.version())
... else:
...     print("CUDA is not available")
...
CUDA device name: NVIDIA GeForce RTX 3060
CUDA device capability: (8, 6)
cuDNN version: 90501
@Bobholamovic
Copy link
Member

请按照paddlex官方教程安装和使用paddlex:
https://paddlepaddle.github.io/PaddleX/latest/installation/paddlepaddle_install.html

@BiFangKNT
Copy link
Author

请按照paddlex官方教程安装和使用paddlex: https://paddlepaddle.github.io/PaddleX/latest/installation/paddlepaddle_install.html

我就是按照这个教程安装的

@Bobholamovic
Copy link
Member

不好意思,我看错了……建议使用paddlex官方容器,里面有已经装好的paddlex~

@BiFangKNT
Copy link
Author

不好意思,我看错了……建议使用paddlex官方容器,里面有已经装好的paddlex~

我用的就是官方docker镜像啊

@Bobholamovic
Copy link
Member

从上面的描述上看,你使用的应该是paddle框架的官方镜像,其中预装了框架(paddlepaddle-gpu),但是没有安装paddlex。我建议尝试使用PaddleX的官方镜像,目前最新的稳定版本是:ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/paddlex:paddlex3.0.0rc0-paddlepaddle3.0.0rc0-gpu-cuda12.3-cudnn9.0-trt8.6

可以参考这个文档:https://paddlepaddle.github.io/PaddleX/latest/installation/installation.html

@BiFangKNT
Copy link
Author

从上面的描述上看,你使用的应该是_paddle框架的官方镜像_,其中预装了框架(paddlepaddle-gpu),但是没有安装paddlex。我建议尝试使用PaddleX的官方镜像,目前最新的稳定版本是:ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/paddlex:paddlex3.0.0rc0-paddlepaddle3.0.0rc0-gpu-cuda12.3-cudnn9.0-trt8.6

可以参考这个文档:https://paddlepaddle.github.io/PaddleX/latest/installation/installation.html

哦原来这是不同的镜像啊,文档太多看到我眼花缭乱了😂

@Bobholamovic
Copy link
Member

不好意思,这里确实有些误导了,文档方面我们会持续优化的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants