Spaces:
Paused
Paused
Commit ·
7b08d27
1
Parent(s): abe7d5b
changes
Browse files- Dockerfile +24 -4
- server/requirements.txt +13 -8
Dockerfile
CHANGED
|
@@ -1,21 +1,41 @@
|
|
| 1 |
FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel
|
|
|
|
| 2 |
ARG DEBIAN_FRONTEND=noninteractive
|
| 3 |
|
|
|
|
| 4 |
RUN apt-get update && \
|
| 5 |
-
apt-get install --no-install-recommends
|
|
|
|
|
|
|
| 6 |
apt-get clean && apt-get -y autoremove
|
| 7 |
|
| 8 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
-
RUN
|
| 11 |
-
|
| 12 |
|
|
|
|
| 13 |
RUN python -m unidic download
|
|
|
|
|
|
|
| 14 |
RUN mkdir -p /app/tts_models
|
| 15 |
|
|
|
|
| 16 |
COPY app.py .
|
| 17 |
-
ENV NVIDIA_DISABLE_REQUIRE=1
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
ENV NUM_THREADS=2
|
|
|
|
|
|
|
|
|
|
| 20 |
EXPOSE 7860
|
|
|
|
|
|
|
| 21 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel
|
| 2 |
+
|
| 3 |
ARG DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
+
# Install system dependencies
|
| 6 |
RUN apt-get update && \
|
| 7 |
+
apt-get install -y --no-install-recommends \
|
| 8 |
+
sox libsox-fmt-all curl wget gcc git git-lfs \
|
| 9 |
+
libsndfile1 ffmpeg build-essential && \
|
| 10 |
apt-get clean && apt-get -y autoremove
|
| 11 |
|
| 12 |
WORKDIR /app
|
| 13 |
+
|
| 14 |
+
# Upgrade pip
|
| 15 |
+
RUN pip install --upgrade pip
|
| 16 |
+
|
| 17 |
+
# Install Python dependencies
|
| 18 |
COPY requirements.txt .
|
| 19 |
+
RUN pip install -r requirements.txt && \
|
| 20 |
+
pip cache purge
|
| 21 |
|
| 22 |
+
# Download unidic dictionary
|
| 23 |
RUN python -m unidic download
|
| 24 |
+
|
| 25 |
+
# Create directory for TTS models
|
| 26 |
RUN mkdir -p /app/tts_models
|
| 27 |
|
| 28 |
+
# Copy application code
|
| 29 |
COPY app.py .
|
|
|
|
| 30 |
|
| 31 |
+
# Set environment variables
|
| 32 |
+
ENV NUMBA_DISABLE_CACHE=1
|
| 33 |
+
ENV NVIDIA_DISABLE_REQUIRE=1
|
| 34 |
ENV NUM_THREADS=2
|
| 35 |
+
ENV USE_CPU=0
|
| 36 |
+
|
| 37 |
+
# Expose the correct port (match with test_streaming.py)
|
| 38 |
EXPOSE 7860
|
| 39 |
+
|
| 40 |
+
# Run the Uvicorn server on the correct port
|
| 41 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
server/requirements.txt
CHANGED
|
@@ -1,12 +1,17 @@
|
|
| 1 |
-
TTS @ git+https://github.com/coqui-ai/TTS@fa28f99f1508b5b5366539b2149963edcb80ba62
|
| 2 |
-
|
| 3 |
-
fastapi==0.95.2
|
| 4 |
-
deepspeed
|
| 5 |
-
pydantic==1.10.13
|
| 6 |
python-multipart==0.0.6
|
| 7 |
-
typing-extensions
|
| 8 |
-
|
| 9 |
-
cutlet
|
| 10 |
mecab-python3==1.0.6
|
| 11 |
unidic-lite==1.0.8
|
| 12 |
unidic==1.1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
TTS @ git+https://github.com/coqui-ai/TTS.git@fa28f99f1508b5b5366539b2149963edcb80ba62
|
| 2 |
+
pyannote==1.0.13
|
|
|
|
|
|
|
|
|
|
| 3 |
python-multipart==0.0.6
|
| 4 |
+
typing-extensions==4.8.0
|
| 5 |
+
cutlet==0.3.0
|
|
|
|
| 6 |
mecab-python3==1.0.6
|
| 7 |
unidic-lite==1.0.8
|
| 8 |
unidic==1.1.0
|
| 9 |
+
langid==1.1.6
|
| 10 |
+
deepspeed==0.14.5
|
| 11 |
+
pydub==0.25.1
|
| 12 |
+
uvicorn==0.30.6
|
| 13 |
+
fastapi==0.115.0
|
| 14 |
+
numpy==1.24.4
|
| 15 |
+
scipy==1.13.1
|
| 16 |
+
numba==0.58.1
|
| 17 |
+
librosa==0.10.2
|