1
1
FROM python:3.11-slim
2
2
3
+ RUN mkdir -p /app && \
4
+ cd /app && \
5
+ apt update && \
6
+ apt install -y git && \
7
+ apt clean && \
8
+ git clone https://github.com/rhasspy/piper && \
9
+ cd piper && \
10
+ rm -f .git
3
11
4
- # Set the working directory
5
- WORKDIR /app
6
-
7
- # Get the latest version of the code
8
- RUN apt update && apt install -y git
9
- RUN git clone https://github.com/rhasspy/piper
10
-
11
- # Update pip and install the required packages
12
- RUN pip install --upgrade pip
13
-
14
- # Set the working directory
15
12
WORKDIR /app/piper/src/python_run
16
13
17
- # Install the package
18
- RUN pip install -e .
19
-
20
- # Install the requirements
21
- RUN pip install -r requirements.txt
14
+ RUN pip install --no-cache-dir --upgrade pip && \
15
+ pip install --no-cache-dir - e . && \
16
+ pip install --no-cache-dir -r requirements.txt && \
17
+ pip install --no-cache-dir -r requirements_http.txt && \
18
+ pip install --no-cache-dir wget
22
19
23
- # Install http server
24
- RUN pip install -r requirements_http.txt
25
-
26
- # Install wget pip package
27
- RUN pip install wget
28
-
29
- # Copy the run.py file into the container
30
- COPY run.py /app
31
- # Copy the download folder into the container
32
- COPY download /app/download
33
-
34
- # Expose the port 5000
35
20
EXPOSE 5000
36
21
37
- CMD ["python" , "-m" , "piper.http_server" , "-m" , "/app/models/model.onnx" ]
38
-
39
- # # Create ENV that will be used in the run.py file to set the download link
40
- # 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"
41
- #
42
- # # Create ENV that will be used in the run.py file to set the target folder
43
- # ENV MODEL_TARGET_FOLDER="/app/models"
44
- #
45
- # # Create ENV that will be used in the run.py file to set the speaker
46
- # ENV SPEAKER="0"
47
- #
48
- # # Run the webserver with python run.py
49
- # CMD python /app/run.py $MODEL_DOWNLOAD_LINK $MODEL_TARGET_FOLDER $SPEAKER
22
+ CMD ["python" , "-m" , "piper.http_server" , "-m" , "/app/models/model.onnx" ]
0 commit comments