At present, PaddleClas requires PaddlePaddle version >=2.0
. Docker is recomended to run Paddleclas, for more detailed information about docker and nvidia-docker, you can refer to the tutorial. If you do not want to use docker, you can skip section 2. (Recommended) Prepare a docker environment, and go into section 3. Install PaddlePaddle using pip.
Recomends:
>= 418.39
;>= 440.33
;cd /home/Projects
# For GPU users
sudo nvidia-docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it paddlepaddle/paddle:2.1.0-gpu-cuda10.2-cudnn7 /bin/bash
# For CPU users
sudo docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it paddlepaddle/paddle:2.1.0 /bin/bash
Notices:
--shm-size=8g
will set the shared memory of the container to 8g. If conditions permit, it is recommended to set this parameter to a larger value, such as 64g
;Ctrl + P + Q
without closing the container;sudo Docker exec -it ppcls /bin/bash
If you want to use PaddlePaddle on GPU, you can use the following command to install PaddlePaddle.
pip install paddlepaddle-gpu --upgrade -i https://mirror.baidu.com/pypi/simple
If you want to use PaddlePaddle on CPU, you can use the following command to install PaddlePaddle.
pip install paddlepaddle --upgrade -i https://mirror.baidu.com/pypi/simple
Note:
import paddle
paddle.utils.run_check()
Check PaddlePaddle version:
python -c "import paddle; print(paddle.__version__)"
Note:
WITH_DISTRIBUTE=ON
when compiling, Please refer to Instruction for more details.--shm-size=8g
at creating a docker container, if conditions permit, you can set it to a larger value.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。