Dockerfile: avoid repo models/ dependency; skip large ckpt; install yarngpt if missing
Browse files- Dockerfile +9 -6
Dockerfile
CHANGED
|
@@ -65,16 +65,19 @@ RUN if [ -n "$HF_TOKEN" ]; then \
|
|
| 65 |
# Note: Models will be downloaded lazily at runtime to save build storage
|
| 66 |
# Pre-downloading is disabled to avoid storage limit issues
|
| 67 |
|
| 68 |
-
#
|
| 69 |
RUN mkdir -p /code/models && \
|
| 70 |
-
wget -O /code/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml \
|
| 71 |
-
https://huggingface.co/novateur/WavTokenizer-medium-speech-75token/resolve/main/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml
|
| 72 |
-
cp /code/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml /code/models/ && \
|
| 73 |
-
wget --no-check-certificate 'https://drive.usercontent.google.com/download?id=1-ASeEkrn4HY49yZWHTASgfGFNXdVnLTt&export=download&confirm=t' -O /code/models/wavtokenizer_large_speech_320_24k.ckpt
|
| 74 |
|
| 75 |
# Copy project files
|
| 76 |
COPY . .
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
# Expose FastAPI port
|
| 80 |
EXPOSE 7860
|
|
|
|
| 65 |
# Note: Models will be downloaded lazily at runtime to save build storage
|
| 66 |
# Pre-downloading is disabled to avoid storage limit issues
|
| 67 |
|
| 68 |
+
# Optional: download small config at build; skip large checkpoints
|
| 69 |
RUN mkdir -p /code/models && \
|
| 70 |
+
wget -q -O /code/models/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml \
|
| 71 |
+
https://huggingface.co/novateur/WavTokenizer-medium-speech-75token/resolve/main/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml || true
|
|
|
|
|
|
|
| 72 |
|
| 73 |
# Copy project files
|
| 74 |
COPY . .
|
| 75 |
+
# Install yarngpt if not vendored in repo
|
| 76 |
+
RUN if [ -d "/code/yarngpt" ] && [ -f "/code/yarngpt/audiotokenizer.py" ]; then \
|
| 77 |
+
echo "Using vendored yarngpt from project"; \
|
| 78 |
+
else \
|
| 79 |
+
pip install --no-cache-dir git+https://github.com/saheedniyi02/yarngpt.git; \
|
| 80 |
+
fi
|
| 81 |
|
| 82 |
# Expose FastAPI port
|
| 83 |
EXPOSE 7860
|