Skip to content

PaddlePaddle Local Installation Tutorial

When installing PaddlePaddle, you can choose to install it via Docker or pip.

Installing PaddlePaddle via Docker

If you choose to install via Docker, please refer to the following commands to use the official PaddlePaddle Docker image to create a container named paddlex and map the current working directory to the /paddle directory inside the container:

If your Docker version >= 19.03, please use:

# For CPU users:
docker run --name paddlex -v $PWD:/paddle --shm-size=8G --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0b2 /bin/bash

# For GPU users:
# CUDA 11.8 users
docker run --gpus all --name paddlex -v $PWD:/paddle --shm-size=8G --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0b2-gpu-cuda11.8-cudnn8.6-trt8.5 /bin/bash

# CUDA 12.3 users
docker run --gpus all --name paddlex -v $PWD:/paddle  --shm-size=8G --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0b2-gpu-cuda12.3-cudnn9.0-trt8.6 /bin/bash
  • If your Docker version <= 19.03 and >= 17.06, please use:
Click Here
# For CPU users:
docker run --name paddlex -v $PWD:/paddle --shm-size=8G --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0b2 /bin/bash

# For GPU users:
# CUDA 11.8 users
nvidia-docker run --name paddlex -v $PWD:/paddle --shm-size=8G --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0b2-gpu-cuda11.8-cudnn8.6-trt8.5 /bin/bash

# CUDA 12.3 users
nvidia-docker run --name paddlex -v $PWD:/paddle  --shm-size=8G --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0b2-gpu-cuda12.3-cudnn9.0-trt8.6 /bin/bash
  • If your Docker version <= 17.06, please update your Docker.

  • Note: For more official PaddlePaddle Docker images, please refer to the PaddlePaddle official website

Installing PaddlePaddle via pip

If you choose to install via pip, please refer to the following commands to install PaddlePaddle in your current environment using pip:

# CPU
python -m pip install paddlepaddle==3.0.0b2 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

# GPU, this command is only suitable for machines with CUDA version 11.8
python -m pip install paddlepaddle-gpu==3.0.0b2 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/

# GPU, this command is only suitable for machines with CUDA version 12.3
python -m pip install paddlepaddle-gpu==3.0.0b2 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
Note: For more PaddlePaddle Wheel versions, please refer to the PaddlePaddle official website.

For installing PaddlePaddle on other hardware, please refer to PaddleX Multi-hardware Usage Guide.

After installation, you can verify if PaddlePaddle is successfully installed using the following command:

python -c "import paddle; print(paddle.__version__)"
If the installation is successful, the following content will be output:

3.0.0-beta2

Note: If you encounter any issues during the installation process, feel free to submit an issue in the Paddle repository.

Comments