
# Build the docker image and run the container

Run the command below to build the Docker image. This will install Docker if not already installed, set up the necessary permissions, and build the image with the required dependencies for audio processing:

```bash
./build_docker.sh
```

# Docker Commands for Audio Processing

## Process Audio Features
### Start a new batch processing container for a single batch 
```bash
sudo docker run -d --rm \
    --name audio_proc_batch_8 \
    -v "$PWD":/app \
    -w /app \
    my-python-jupyter-suno \
    python3 -u process_audio_features.py --batch_idx 8
```
or run this script to start a background job for all batches with 10 workers 

```bash
./run_job.sh
```

## Monitoring
### View container logs in real-time
```bash
docker logs -f audio_proc_batch_8
```


### List all containers
```bash
sudo docker ps -a
```

### Check available system memory
```bash
AVAILABLE_MEM=$(free -g | awk '/^Mem:/{print $7}')
echo "Available memory: ${AVAILABLE_MEM}GB"
```

### Stop the container
```bash
sudo docker stop audio_proc
```

### Remove the container
```bash
sudo docker rm audio_proc
```
