Installation
Get GoMLX running in your Go project in under five minutes.
๐ ๏ธ + โ๏ธ Installation
For most users, no installation is needed.
For XLA, it will by default auto-install the required XLA PJRT plugins (for CPU, GPU and TPUs; Linux and Macs)
in the user’s local lib directory ($HOME/.local/lib/go-xla in Linux; $HOME/Library/Application Support/go-xla in Mac;
$HOME\AppData\Local\go-xla in Windows).
It can be disabled by setting GOMLX_NO_AUTO_INSTALL or programmatically by calling xla.EnableAutoInstall(false)).
If you want to manually pre-install for building production dockers, a specific version, or such custom setups, see github.com/gomlx/go-xla for details, there is a self-explanatory simple installer program.
If you want to use only a pure Go backend, simply do import _ "github.com/gomlx/gomlx/backends/simplego" and
there is no need to install anything.
๐ณ Pre-built Docker
The easiest to start playing with it, it’s just pulling the docker image that includes GoMLX + JupyterLab + GoNB (a Go kernel for Jupyter) and Nvidia’s CUDA runtime (for optional support of GPU) pre-installed – it is ~5Gb to download.
From a directory you want to make visible in Jupyter, do:
For GPU support add the flag
--gpus allto thedocker runcommand bellow.
docker pull janpfeifer/gomlx_jupyterlab:latest
docker run -it --rm -p 8888:8888 -v "${PWD}":/home/jupyter/work janpfeifer/gomlx_jupyterlab:latest
It will display a URL starting with 127.0.0.1:8888 in the terminal (it will include a secret token needed) that you can open in your browser.
You can open and interact with the tutorial from there, it is included in the docker under the directory Projects/gomlx/examples/tutorial.
More details on the docker here.
It runs on Windows as well: Docker Desktop uses WSL2 under the hood.