在Docker中使用CUDA运行torch时提示找不到模块’cutorch’

我正在运行Ubuntu 16.04。我有一个运行深度神经网络的Docker容器,运行得很完美。但如果我指定使用CUDA,它会抛出以下错误:

/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/trepl/init.lua:384: module 'cutorch' not found:No LuaRocks module found for cutorch    no field package.preload['cutorch']    no file '/root/.luarocks/share/lua/5.1/cutorch.lua'    no file '/root/.luarocks/share/lua/5.1/cutorch/init.lua'    no file '/root/torch/install/share/lua/5.1/cutorch.lua'    no file '/root/torch/install/share/lua/5.1/cutorch/init.lua'    no file './cutorch.lua'    no file '/root/torch/install/share/luajit-2.1.0-beta1/cutorch.lua'    no file '/usr/local/share/lua/5.1/cutorch.lua'    no file '/usr/local/share/lua/5.1/cutorch/init.lua'    no file '/root/.luarocks/lib/lua/5.1/cutorch.so'    no file '/root/torch/install/lib/lua/5.1/cutorch.so'    no file '/root/torch/install/lib/cutorch.so'    no file './cutorch.so'    no file '/usr/local/lib/lua/5.1/cutorch.so'    no file '/usr/local/lib/lua/5.1/loadall.so'stack traceback:    [C]: in function 'error'    /root/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'    /root/openface/batch-represent/main.lua:22: in main chunk    [C]: in function 'dofile'    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk    [C]: at 0x00406670

CUDA/NVIDIA驱动程序是否需要在Docker容器中单独安装?如果需要,如何安装?

我正在使用GTX Geforce TITAN黑卡。


回答:

已经解决了问题。我之前使用的Docker文件仅适用于在CPU上执行操作。

我应该创建另一个Docker文件,或者使用像Dl-dockerNvidia-docker这样的工具。

Related Posts

L1-L2正则化的不同系数

我想对网络的权重同时应用L1和L2正则化。然而,我找不…

使用scikit-learn的无监督方法将列表分类成不同组别,有没有办法?

我有一系列实例,每个实例都有一份列表,代表它所遵循的不…

f1_score metric in lightgbm

我想使用自定义指标f1_score来训练一个lgb模型…

通过相关系数矩阵进行特征选择

我在测试不同的算法时,如逻辑回归、高斯朴素贝叶斯、随机…

可以将机器学习库用于流式输入和输出吗?

已关闭。此问题需要更加聚焦。目前不接受回答。 想要改进…

在TensorFlow中,queue.dequeue_up_to()方法的用途是什么?

我对这个方法感到非常困惑,特别是当我发现这个令人费解的…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注