1:安装paddle
A:官网:飞桨PaddlePaddle-源于产业实践的开源深度学习平台
B:拉取镜像
nvidia-docker pull registry.baidubce.com/paddlepaddle/paddle:2.4.1-gpu-cuda11.2-cudnn8.2-trt8.0
C:创建容器
docker run --privileged=true --gpus all -p 10008:22 -it --shm-size 8G --name=paddle2.4.1 -v /home/mnt/sda/lilai:/home 2235d6d629b8 /bin/bash
2:安装paddleslim
B:安装
pip install paddleslim -i https://pypi.tuna.tsinghua.edu.cn/simple
3:可能的错误:
1:Could not build wheels for swig which use PEP 517 and cannot be installed directly
本质的错误是这一行:
Problem with the CMake installation, aborting build. CMake executable is cmake
处理:
更新pip,安装cmake,安装swig,重装paddleslim:
pip3 install pip -U
pip3 install cmake
pip install swig