itorch 安装

来源:互联网 发布:svn服务器搭建ubuntu 编辑:程序博客网 时间:2024/05/29 08:29
pip install ipythonpip install  notebookpip install jupytersudo apt-get install python-zmqsudo apt-get install python-jinja2sudo pip install tornadosudo apt-get install python-jsonschema把ipython的路径加入到环境变量/usr/lib/python2.7/site-packagesvim /etc/profile.......source /etc/profileluarocks install lzmqluarocks install itorch#或者去github上面下载,解压后执行luarocks  make








注意以上除了pip 和yum安装的 在root下安装,luarocks 要在当前用户下安装


否则在web界面上只能使用python库,而用不了lua




运行:
去github上下载itorch的demohttps://github.com/facebook/iTorch解压后,
进入解压目录执行 itorch notebook 注意,
此命令在哪个目录下执行,就把哪个目录作为根文件夹访问浏览器 http://localhost:8888/tree




官方教程:

Requirements

iTorch requires or works with

  • Mac OS X or Linux (tested in Ubuntu 14.04 and Arch Linux)
  • Torch-7
  • IPython version 2.2 or above (you can check your version of ipython using ipython --version)
  • ZeroMQ
# OSXbrew install zeromqbrew install opensslluarocks install luacrypto OPENSSL_DIR=/usr/local/opt/openssl/# Ubuntusudo apt-get install libzmq3-dev libssl-dev python-zmq# Ubuntu 16luarocks install lzmq

使用非root用户安装 Installing iTorch

git clone https://github.com/facebook/iTorch.gitcd iTorchluarocks make 

如果不小心使用了root用户安装,需要执行下面命令,If you have to use sudo for some reason (if you globally installed torch on Linux for example), use these commands:

sudo env "PATH=$PATH" luarocks makesudo chown -R $USER $(dirname $(ipython locate profile))

Docker Images

Ubuntu 14.04 + iTorch notebook + Miniconda: see docker hub repo.

docker pull dhunter/itorch-notebook

How iTorch works

Start iTorch at command-line using the following command:

itorch notebook  # notebook modeOR  itorch  # console modeOR  itorch qtconsole  # Qt mode

In notebook mode, you can use the "New" button to create a new notebook.

0 0