AvatarResurrectionChatbot commited on
Commit
5aff46e
·
verified ·
1 Parent(s): 0c3f1f9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -0
Dockerfile CHANGED
@@ -47,6 +47,15 @@ RUN python -c "from huggingface_hub import snapshot_download; \
47
  snapshot_download('hubertsiuzdak/snac_24khz')" \
48
  || echo 'WARNING: SNAC pre-download failed'
49
 
 
 
 
 
 
 
 
 
 
50
  # Download Vosk small English model (~50MB, CPU-only STT)
51
  RUN python -c "import urllib.request, zipfile, os; \
52
  url='https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip'; \
@@ -64,6 +73,9 @@ COPY --chown=user ./app.py ./llm.py ./groq_tts.py ./orpheus_tts.py ./float_lipsy
64
  # Copy avatar profiles (each has ref.png, persona.txt, idlevideos/)
65
  COPY --chown=user ./avatars/ /app/avatars/
66
 
 
 
 
67
  # Copy voice reference + transcript for voice cloning (used by orpheus_tts)
68
  COPY --chown=user ./voice* /app/
69
 
 
47
  snapshot_download('hubertsiuzdak/snac_24khz')" \
48
  || echo 'WARNING: SNAC pre-download failed'
49
 
50
+ # Pre-download FLOAT dependencies (wav2vec2 + emotion model) — cached in Docker layer
51
+ RUN mkdir -p /app/checkpoints && \
52
+ python -c "from huggingface_hub import snapshot_download; \
53
+ print('Downloading wav2vec2-base-960h...'); \
54
+ snapshot_download('facebook/wav2vec2-base-960h', local_dir='/app/checkpoints/wav2vec2-base-960h'); \
55
+ print('Downloading emotion model...'); \
56
+ snapshot_download('r-f/wav2vec-english-speech-emotion-recognition', local_dir='/app/checkpoints/wav2vec-english-speech-emotion-recognition'); \
57
+ print('Models ready')"
58
+
59
  # Download Vosk small English model (~50MB, CPU-only STT)
60
  RUN python -c "import urllib.request, zipfile, os; \
61
  url='https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip'; \
 
73
  # Copy avatar profiles (each has ref.png, persona.txt, idlevideos/)
74
  COPY --chown=user ./avatars/ /app/avatars/
75
 
76
+ # Copy checkpoints (wav2vec2, emotion model, float.pth) — baked in to avoid runtime downloads
77
+ COPY --chown=user ./app/checkpoints/ /app/checkpoints/
78
+
79
  # Copy voice reference + transcript for voice cloning (used by orpheus_tts)
80
  COPY --chown=user ./voice* /app/
81