This guide is for those wanting to run OpenAI Jukebox on their own machines.
Do note that you will need a 16GB VRAM-equipped GPU or (more preferably) higher in order to utilize Jukebox to its fullest potential.
Additionally, you will also want to be using a Linux distro of some kind. WSL works too in my experience, but I've found native Linux to be the more stable and reliable option. Native Windows should in theory work (I've never gotten it to), but Windows overheads can mean that you have less available VRAM at your disposal. Jukebox is particularly heavy on that front.
The instructions in this guide and the commands in the notebook assume an Ubuntu/Debian-based system (i.e. Linux Mint), but the things you'll need to install should be available on most distros.
- If you don't have it already, download and install Miniconda (or Anaconda) from https://docs.anaconda.com/free/miniconda/. I recommend using the quick command line install option at the bottom, as it's very easy to get started.
- Once your Conda setup is running (you will likely need to restart your shell to apply changes), type
conda create -n jukebox python=3.7
to create the environment we'll be using. The choice of Python 3.7 is important, as it's the most widely compatible with Jukebox. - After that's finished, type
conda activate jukebox
to enter the new environment. - Type
conda install jupyterlab
to install the software that will open our Jukebox notebook. - Enter this command to install PyTorch:
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
. Note that Pytorch 2 is not supported by Jukebox, so we're instead installing the last version of PyTorch 1. - Download the notebook below to your computer.
- In your command line, type
jupyter-lab
. This will start up the software in your default browser. Find the notebook you just downloaded in Jupyter Lab and open it. (Also note that wherever you startjupyter-lab
will be the place where audio outputs are saved.) - From here, you can follow the directions in the notebook by pressing Shift+Enter to run individual cells. If you run into permission errors when installing system packages within the notebook, you'll want to run those in a separate command line window with elevated permissions.