Study machine learning by torch-rb and matplotlib.
- Ubuntu 18.04
- rbenv ruby2.6.6
- torch-rb (require libtorch)
- matplotlib for ruby (require pycall, python, matplotlib)
Get started using the 'Dockerfile'
sudo apt-get install x11-xserver-utils
xhost + # enable matplotlib display in docker
docker build -t my-env:1.0 .
docker run -it \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
-e GDK_SCALE \
-e GDK_DPI_SCALE \
my-env:1.0
if you got trouble when executed docker build
, just try it again.
https://github.com/MorvanZhou/PyTorch-Tutorial https://github.com/ankane/torch.rb