Skip to content

安装指南

各平台的详细安装说明。

系统要求

要求最低版本推荐版本
CUDA Toolkit11.012.2+
CMake3.183.25+
C++ 编译器C++17C++20
GPU 计算能力sm_70sm_80+
内存8GB16GB+

Linux 安装

Ubuntu/Debian

bash
# 安装 CUDA Toolkit (如尚未安装)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update
sudo apt install cuda-toolkit-12-2

# 安装 CMake
sudo apt install cmake

# 验证安装
nvcc --version
cmake --version

CentOS/RHEL

bash
# 添加 NVIDIA 仓库
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
sudo dnf install cuda-toolkit-12-2

# 安装 CMake
sudo dnf install cmake

Windows 安装

  1. 安装 CUDA ToolkitNVIDIA Developer 下载

  2. 安装 Visual Studio 2019 或更高版本,包含 C++ 开发工具

  3. 安装 CMakecmake.org 下载

  4. 构建:

    powershell
    cmake --preset release
    cmake --build --preset release --config Release

验证安装

bash
# 检查 CUDA
nvcc --version

# 检查 CMake
cmake --version

# 检查 GPU
nvidia-smi

# 运行快速测试
git clone https://github.com/AICL-Lab/mini-image-pipe.git
cd mini-image-pipe
cmake --preset release
cmake --build --preset release
ctest --preset release

Docker (可选)

dockerfile
FROM nvidia/cuda:12.2-devel-ubuntu22.04

RUN apt update && apt install -y cmake git
WORKDIR /app
COPY . .
RUN cmake --preset release && cmake --build --preset release

CMD ["./build/demo_pipeline"]
bash
docker build -t mini-image-pipe .
docker run --gpus all mini-image-pipe

基于 MIT 许可证发布