-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
47 lines (32 loc) · 1.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM python:3.11-slim
# Set the working directory
WORKDIR /app
# Get the latest version of the code
RUN apt update && apt install -y git
RUN git clone https://github.com/rhasspy/piper
# Update pip and install the required packages
RUN pip install --upgrade pip
# Set the working directory
WORKDIR /app/piper/src/python_run
# Install the package
RUN pip install -e .
# Install the requirements
RUN pip install -r requirements.txt
# Install http server
RUN pip install -r requirements_http.txt
# Install wget pip package
RUN pip install wget
# Copy the run.py file into the container
COPY run.py /app
# Copy the download folder into the container
COPY download /app/download
# Expose the port 5000
EXPOSE 5000
# Create ENV that will be used in the run.py file to set the download link
ENV MODEL_DOWNLOAD_LINK="https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/de/de_DE/pavoque/low/de_DE-pavoque-low.onnx?download=true"
# Create ENV that will be used in the run.py file to set the target folder
ENV MODEL_TARGET_FOLDER="/app/models"
# Create ENV that will be used in the run.py file to set the speaker
ENV SPEAKER="0"
# Run the webserver with python run.py
CMD python /app/run.py $MODEL_DOWNLOAD_LINK $MODEL_TARGET_FOLDER $SPEAKER