Skip to content

Instantly share code, notes, and snippets.

@WAUthethird
Last active February 14, 2024 02:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WAUthethird/e995d68e95272e06b0574b51f6da7b1c to your computer and use it in GitHub Desktop.
Save WAUthethird/e995d68e95272e06b0574b51f6da7b1c to your computer and use it in GitHub Desktop.
Local Setup for OpenAI Jukebox

Local Setup for OpenAI Jukebox

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.

Installation and Setup

  1. 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.
  2. 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.
  3. After that's finished, type conda activate jukebox to enter the new environment.
  4. Type conda install jupyterlab to install the software that will open our Jukebox notebook.
  5. 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.
  6. Download the notebook below to your computer.
  7. 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 start jupyter-lab will be the place where audio outputs are saved.)
  8. 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.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment