Skip to content

gphorvath/music-generation

Repository files navigation

Music Gen Experiment

Description

A dockerized version of facebook/MusicGen that uses Poetry, FastAPI, and Uvicorn.

Dependencies

  • Cuda version 12
  • cudnn 8
  • libnccl2
  • Poetry

Setup

  • Ensure you have the above dependencies squared away (nvidia drivers are always fun to setup...)
# Configure Poetry Virtual Environment
poetry config virtualenvs.in-project true

poetry install

Run Locally

# Start Server
poetry shell # Opens a shell in the Poetry Virtual Environment

uvicorn main:app --reload # Starts the server

Navigate to http://localhost:8000/docs to verify it works.

Jupyter Notebook

The testbed.ipynb gives you everything you need to test drive the API.

Docker

# Make sure to periodically prune your old images (they can be large)
docker builder prune

docker build . -t music-gen:0.1

docker run -it --rm -p 5000:5000 --gpus all music-gen:0.1 # included in docker-run.sh

Navigate to http://localhost:5000/docs to verify it works.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published