我正在尝试从 conda 的源代码安装 cudf,我无法使用 cmake 来安装它
I am trying to install cudf from source for conda, I cannot use cmake to install it
我正尝试按照页面 (https://github.com/rapidsai/cudf/blob/branch-0.15/CONTRIBUTING.md#setting-up-your-build-environment )
中给出的源文件安装 CUDF
后面几步我cmake都无法完成
Build and install libcudf after its dependencies. CMake depends on the nvcc executable being on your path or defined in $CUDACXX.
$ cd $CUDF_HOME/cpp
$ mkdir build
$ cd build
然后它说
-DCMAKE_INSTALL_PREFIX set to the install path for your libraries or $CONDA_PREFIX if you're using Anaconda, i.e. -DCMAKE_INSTALL_PREFIX=/install/path or-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX# -DCMAKE_CXX11_ABI set to ON or OFF depending on the ABI version you want, defaults to ON. When turned ON, ABI compatibility for C++11 is used. When OFF, pre-C++11 ABI compatibility is used.
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_CXX11_ABI=ON
然后出现如下错误
cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:219 (file):
file failed to open for writing (Permission denied):
/home/CUDF/cudf/cpp/build/CMakeFiles/3.16.3/CompilerIdCUDA/CMakeCUDACompilerId.cu
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:18 (project)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:219 (file):
file failed to open for writing (Permission denied):
/home/CUDF/cudf/cpp/build/CMakeFiles/3.16.3/CompilerIdCUDA/CMakeCUDACompilerId.cu
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:18 (project)
-- The CUDA compiler identification is unknown
-- Check for working CUDA compiler: /home/anaconda3/envs/cudf_dev/
-- Check for working CUDA compiler: /home/anaconda3/envs/cudf_dev/ -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCUDACompiler.cmake:46 (message):
The CUDA compiler
"/home/anaconda3/envs/cudf_dev/"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_9f254/fast && /usr/bin/make -f CMakeFiles/cmTC_9f254.dir/build.make CMakeFiles/cmTC_9f254.dir/build
make[1]: Entering directory '/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Building CUDA object CMakeFiles/cmTC_9f254.dir/main.cu.o
/home/anaconda3/envs/cudf_dev/ -x cu -c /home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_9f254.dir/main.cu.o
make[1]: execvp: /home/anaconda3/envs/cudf_dev/: Permission denied
make[1]: *** [CMakeFiles/cmTC_9f254.dir/build.make:66: CMakeFiles/cmTC_9f254.dir/main.cu.o] Error 127
make[1]: Leaving directory '/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_9f254/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:18 (project)
-- Configuring incomplete, errors occurred!
See also "/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeOutput.log".
See also "/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeError.log".
k@k-HP:~/CUDF/cudf/cpp/build$
这一步我应该做什么?
P.s :我的蟒蛇路径就像 /home/anaconda3/
cudf 环境路径就像 /home/anaconda3/envs/cudf_dev
请注意,cudf 0.15 不支持 CUDA 10.0 和 python 3.6.
这似乎是一个 CUDA/permissions 问题。
您是否以 root 身份安装/构建了您的 conda env,现在您正在尝试 运行 以用户身份构建?
你 nvidia-smi
的输出是多少?
此外,如果您安装了 CUDA 工具包并且环境的 cuda 版本与 nvidia-smi 中显示的 CUDA 版本相匹配。那么我建议您尝试 运行ning ./build.sh
文件夹中的 /home/CUDF/cudf/
命令。 运行 ./build.sh
适合我。
如果上述解决方案不起作用,您可以随时在 cudf 存储库 (https://github.com/rapidsai/cudf/issues) 中提出问题,并请提供文件 print_env.sh
.
的输出
您还可以使用以下命令安装夜间版的 cudf-0.15 :
conda install -c rapidsai-nightly -c nvidia -c conda-forge -c defaults cudf=0.15 python=3.7 cudatoolkit=10.1
您需要根据您在系统中安装的 CUDA 工具包版本更新 cudatoolkit
版本。
我正尝试按照页面 (https://github.com/rapidsai/cudf/blob/branch-0.15/CONTRIBUTING.md#setting-up-your-build-environment )
中给出的源文件安装 CUDF后面几步我cmake都无法完成
Build and install libcudf after its dependencies. CMake depends on the nvcc executable being on your path or defined in $CUDACXX.
$ cd $CUDF_HOME/cpp
$ mkdir build
$ cd build
然后它说
-DCMAKE_INSTALL_PREFIX set to the install path for your libraries or $CONDA_PREFIX if you're using Anaconda, i.e. -DCMAKE_INSTALL_PREFIX=/install/path or-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX# -DCMAKE_CXX11_ABI set to ON or OFF depending on the ABI version you want, defaults to ON. When turned ON, ABI compatibility for C++11 is used. When OFF, pre-C++11 ABI compatibility is used.
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_CXX11_ABI=ON
然后出现如下错误
cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:219 (file):
file failed to open for writing (Permission denied):
/home/CUDF/cudf/cpp/build/CMakeFiles/3.16.3/CompilerIdCUDA/CMakeCUDACompilerId.cu
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:18 (project)
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:219 (file):
file failed to open for writing (Permission denied):
/home/CUDF/cudf/cpp/build/CMakeFiles/3.16.3/CompilerIdCUDA/CMakeCUDACompilerId.cu
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-3.16/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:18 (project)
-- The CUDA compiler identification is unknown
-- Check for working CUDA compiler: /home/anaconda3/envs/cudf_dev/
-- Check for working CUDA compiler: /home/anaconda3/envs/cudf_dev/ -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCUDACompiler.cmake:46 (message):
The CUDA compiler
"/home/anaconda3/envs/cudf_dev/"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_9f254/fast && /usr/bin/make -f CMakeFiles/cmTC_9f254.dir/build.make CMakeFiles/cmTC_9f254.dir/build
make[1]: Entering directory '/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Building CUDA object CMakeFiles/cmTC_9f254.dir/main.cu.o
/home/anaconda3/envs/cudf_dev/ -x cu -c /home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_9f254.dir/main.cu.o
make[1]: execvp: /home/anaconda3/envs/cudf_dev/: Permission denied
make[1]: *** [CMakeFiles/cmTC_9f254.dir/build.make:66: CMakeFiles/cmTC_9f254.dir/main.cu.o] Error 127
make[1]: Leaving directory '/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_9f254/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:18 (project)
-- Configuring incomplete, errors occurred!
See also "/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeOutput.log".
See also "/home/CUDF/cudf/cpp/build/CMakeFiles/CMakeError.log".
k@k-HP:~/CUDF/cudf/cpp/build$
这一步我应该做什么?
P.s :我的蟒蛇路径就像 /home/anaconda3/ cudf 环境路径就像 /home/anaconda3/envs/cudf_dev
请注意,cudf 0.15 不支持 CUDA 10.0 和 python 3.6.
这似乎是一个 CUDA/permissions 问题。
您是否以 root 身份安装/构建了您的 conda env,现在您正在尝试 运行 以用户身份构建?
你 nvidia-smi
的输出是多少?
此外,如果您安装了 CUDA 工具包并且环境的 cuda 版本与 nvidia-smi 中显示的 CUDA 版本相匹配。那么我建议您尝试 运行ning ./build.sh
文件夹中的 /home/CUDF/cudf/
命令。 运行 ./build.sh
适合我。
如果上述解决方案不起作用,您可以随时在 cudf 存储库 (https://github.com/rapidsai/cudf/issues) 中提出问题,并请提供文件 print_env.sh
.
您还可以使用以下命令安装夜间版的 cudf-0.15 :
conda install -c rapidsai-nightly -c nvidia -c conda-forge -c defaults cudf=0.15 python=3.7 cudatoolkit=10.1
您需要根据您在系统中安装的 CUDA 工具包版本更新 cudatoolkit
版本。