在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

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

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