# Modal workers

This folder contains Modal workers that are used to run various tasks.
[Modal](https://modal.com/docs) is a fanstanstic development tool for deploying micro sevices.

# Deployment and run

The commands should be excuted from the root of the repo `suno_utils`.
- To setup the environment, run `uv sync`. (You may need to run `brew install uv` if you don't have uv installed on a mac or `wget -qO- https://astral.sh/uv/install.sh | sh`.)
- To run a worker locally (even though the app is deployed on modal), run `uv run modal run suno_utils/worker/<filename>.py`. You should run and test before deploy.
- To deploy a worker, run `uv run modal deploy suno_utils/worker/<filename>.py`.

# Deploy a new model
See [runbook](https://www.notion.so/suno-ai/Model-Manager-1bbb01573ccf80aea280fea5084764fb?pvs=4) for more details and ssd instructions.
- Copy over the file `cp -p xxx xxx`
- Check the mount volume status: `uv run modal run suno_utils/worker/modal_manager_model_store.py::app.model_store`
- Run the upload script: `python -m suno_utils.worker.modal_manager_model_store upload` 
- Check the status again.

# Schema
We typically communicate between studio API and the workers through a QueueItem object.
See [schema.py](./schema.py) for more details.

# Previous workers 
- bark, whisper, chirp v1, twitter etc removed from [commit](https://github.com/suno-ai/glockenspiel/pull/3743)