Spaces:
Sleeping
Sleeping
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +34 -0
Dockerfile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM debian:11
|
| 2 |
+
|
| 3 |
+
RUN apt-get update && apt-get install -y \
|
| 4 |
+
python3 \
|
| 5 |
+
python3-pip \
|
| 6 |
+
python3-venv \
|
| 7 |
+
git espeak-ng
|
| 8 |
+
|
| 9 |
+
WORKDIR /root
|
| 10 |
+
RUN git clone https://github.com/rhasspy/piper
|
| 11 |
+
RUN pip install -q cython>=0.29.0 espeak-phonemizer>=1.1.0 librosa>=0.9.2 numpy>=1.19.0 pytorch-lightning~=1.7.0 torch~=1.11.0
|
| 12 |
+
RUN pip install -q onnx onnxruntime
|
| 13 |
+
RUN pip install -q torchtext==0.12.0
|
| 14 |
+
|
| 15 |
+
WORKDIR /root/piper/src/python
|
| 16 |
+
RUN bash build_monotonic_align.sh
|
| 17 |
+
RUN pip install -q torchaudio==0.11.0 torchmetrics==0.11.4
|
| 18 |
+
RUN pip install --upgrade gdown
|
| 19 |
+
RUN apt install -y zip unzip wget curl
|
| 20 |
+
RUN mkdir models
|
| 21 |
+
|
| 22 |
+
# Install Flask and other required packages
|
| 23 |
+
RUN pip install flask flask-socketio flask-apscheduler huggingface_hub
|
| 24 |
+
|
| 25 |
+
# Copy the application files
|
| 26 |
+
WORKDIR /app
|
| 27 |
+
COPY app.py .
|
| 28 |
+
COPY templates ./templates
|
| 29 |
+
|
| 30 |
+
# Set environment variable for Flask
|
| 31 |
+
ENV FLASK_APP=app.py
|
| 32 |
+
|
| 33 |
+
# Run the Flask app with SocketIO
|
| 34 |
+
CMD ["python3", "-u", "app.py"]
|