Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ FROM python:3.11-slim
RUN groupadd -r voicebox && \
useradd -r -g voicebox -m -s /bin/bash voicebox

# Create HuggingFace cache directory for the named volume
RUN mkdir -p /home/voicebox/.cache/huggingface \
&& chown -R voicebox:voicebox /home/voicebox/.cache/huggingface

# Create voice generations directory for the named volume
RUN mkdir -p /app/data/generations \
&& chown -R voicebox:voicebox /app/data/generations
Comment on lines +77 to +83

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^Dockerfile$|docker-compose|^scripts/rocm-entrypoint\.sh$)'

echo
echo "== Dockerfile relevant sections =="
if [ -f Dockerfile ]; then
  nl -ba Dockerfile | sed -n '1,140p'
fi

echo
echo "== compose mounts =="
for f in docker-compose.yml docker-compose.yaml; do
  [ -f "$f" ] && { echo "--- $f"; nl -ba "$f" | sed -n '1,180p'; }
done

echo
echo "== entrypoint relevant snippets =="
for f in scripts/rocm-entrypoint.sh; do
  [ -f "$f" ] && { echo "--- $f"; nl -ba "$f" | sed -n '1,220p'; }
done

echo
echo "== search ownership/mount hints =="
rg -n "generations|huggingface|voi(cebox|ce)|chown|mkdir -p|rocm-entrypoint|compose" .

Repository: jamiepine/voicebox

Length of output: 326


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== line ranges for relevant files =="
for f in Dockerfile docker-compose.sh docker-compose.yml docker-compose.rocm.yml scripts/rocm-entrypoint.sh; do
  if [ -f "$f" ]; then
    echo "--- $f"
    wc -l "$f"
    sed -n '1,220p' "$f"
  fi
done

echo "== searches =="
rg -n "generations|huggingface|voicebox|huggingface-cache|output|chown|mkdir -p|rocm-entrypoint|entrypoint" . || true

echo "== script executable bits =="
find . -maxdepth 3 \( -name 'Dockerfile' -o -name 'docker-compose*.yml' -o -name 'rocm-entrypoint.sh' \) -exec ls -la {} \; 2>/dev/null || true

Repository: jamiepine/voicebox

Length of output: 50375


Initialize runtime-owned mount paths as voicebox before applying the volume migrations.

The image ownership at lines 77-83 and 104-105 does not apply to bind-mounted host directories like ./output:/app/data/generations, and existing named volumes can retain wrong ownership after the chown migrations. Run the runtime mount path initialization in scripts/rocm-entrypoint.sh after GPUs are handled but before gosu voicebox, and ensure existing volumes are migrated or recreated with the voicebox UID/GID.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 77 - 83, Move runtime ownership initialization for
/home/voicebox/.cache/huggingface and /app/data/generations from the Dockerfile
into scripts/rocm-entrypoint.sh, after GPU setup and before the gosu voicebox
handoff. Ensure the entrypoint creates missing mount paths and migrates existing
bind mounts or named volumes to the voicebox UID/GID before starting the
application, including handling volumes that retain incorrect ownership.


WORKDIR /app

# Install only runtime system dependencies (gosu drops root in the entrypoint)
Expand Down