安装visdom

官网:https://github.com/facebookresearch/visdom

1、假设当前路径/work/ git clone https://github.com/facebookresearch/visdom.git -->/work/visdom

2、pip install -e /work/visdom

3、cd到visdom路径下,修改server.py <如果找不到的话可以跑一遍python -m vidom.server,停止掉就看到了路径>

把里面的download_scripts() 这一行注释掉

3、修改download.sh

因为download.sh里面下载的路径和启动的路径有点差异,所以我把路径修改如下:

#!/bin/sh

# mkdir -p py/visdom/static/js
wget https://unpkg.com/[email protected]/dist/jquery.min.js -O py/visdom/static/js/jquery.min.js
wget https://unpkg.com/[email protected]/dist/js/bootstrap.min.js -O py/visdom/static/js/bootstrap.min.js
wget https://unpkg.com/[email protected]/umd/react.production.min.js -O py/visdom/static/js/react-react.min.js
wget https://unpkg.com/[email protected]/umd/react-dom.production.min.js -O py/visdom/static/js/react-dom.min.js
wget "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_SVG" -O py/visdom/static/js/mathjax-MathJax.js
# wget https://cdn.rawgit.com/plotly/plotly.js/master/dist/plotly.min.js -O py/visdom/static/js/plotly-plotly.min.js
wget https://unpkg.com/[email protected]/sjcl.js -O py/visdom/static/js/sjcl.js
wget https://cdnjs.cloudflare.com/ajax/libs/react-modal/3.6.1/react-modal.min.js -o py/visdom/static/js/react-modal.min.js


# mkdir -p py/visdom/static/css
wget https://unpkg.com/[email protected]/css/styles.css -O py/visdom/static/css/react-resizable-styles.css
wget https://unpkg.com/[email protected]/css/styles.css -O py/visdom/static/css/react-grid-layout-styles.css
wget https://unpkg.com/[email protected]/dist/css/bootstrap.min.css -O py/visdom/static/css/bootstrap.min.css


mkdir -p py/visdom/static/fonts
wget https://unpkg.com/[email protected] -O py/visdom/static/fonts/classnames
wget https://unpkg.com/[email protected]/dist/layout-bin-packer.js -O py/visdom/static/fonts/layout_bin_packer
wget https://unpkg.com/[email protected]/dist/fonts/glyphicons-halflings-regular.eot -O py/visdom/static/fonts/glyphicons-halflings-regular.eot
wget https://unpkg.com/[email protected]/dist/fonts/glyphicons-halflings-regular.woff2 -O py/visdom/static/fonts/glyphicons-halflings-regular.woff2
wget https://unpkg.com/[email protected]/dist/fonts/glyphicons-halflings-regular.woff -O py/visdom/static/fonts/glyphicons-halflings-regular.woff
wget https://unpkg.com/[email protected]/dist/fonts/glyphicons-halflings-regular.ttf -O py/visdom/static/fonts/glyphicons-halflings-regular.ttf
wget "https://unpkg.com/[email protected]/dist/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular" -O py/visdom/static/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular

cat py/visdom/VERSION > py/visdom/static/version.built

其中plotly-plotly.min.js下载链接:https://pan.baidu.com/s/1YUKPuIgbWAGUEc-F5h26Xw   提取码:ch0z

cd visdom

bash download.sh

4、这里还有一个问题就是会报错

ERROR:tornado.general:Could not open static file '/work/visdom/py/visdom/static/js/layout_bin_packer.js'

解决方法来自:https://github.com/facebookresearch/visdom/pull/405 

wget https://unpkg.com/[email protected] -O /py/visdom/static/js/layout_bin_packer.js

5、启动visdom

python -m vidom.server

我的界面:

你可能感兴趣的:(pytorch,pytorch,visdom)