voice-translator / Dockerfile
bappiahk's picture
Upload Dockerfile
a6ed3b1 verified
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
wget \
build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Clone YarnGPT2 repo for AudioTokenizerV2
RUN git clone https://github.com/saheedniyi02/yarngpt.git /app/yarngpt || true
# Download WavTokenizer config
RUN wget -q -O /app/wavtokenizer_config.yaml \
"https://huggingface.co/novateur/WavTokenizer-medium-speech-75token/resolve/main/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml" \
|| true
# Download WavTokenizer checkpoint via gdown (Google Drive)
RUN python -c "import gdown; gdown.download(id='1-ASeEkrn4HY49yZWHTASgfGFNXdVnLTt', output='/app/wavtokenizer_large_speech_320_24k.ckpt', quiet=False)" \
|| true
COPY app.py .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]