File size: 1,171 Bytes
03a7b4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
06c10ea
f54c5de
 
 
 
06c10ea
 
f54c5de
06c10ea
03a7b4a
597a238
03a7b4a
 
 
f5a22d8
ee51ca9
1e28dd0
c44d8ba
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
# Use the official Python 3.11.9 image
FROM python:3.11.9

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Set the home to the user's home directory and add user's local bin to PATH
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

# Switch to the "user" user
USER user

# Create the app directory
WORKDIR $HOME/app

# Copy the application code and the requirements.txt file
COPY --chown=user . $HOME/app

# Download VOICEVOX Core from latest Release
RUN curl -sSfL https://github.com/VOICEVOX/voicevox_core/releases/latest/download/download.sh -o download.sh

# Give execution permissions
RUN chmod +x download.sh

# Install VOICEVOX Core
RUN ./download.sh

# Clone VOICEVOX Engine from Git Repository
RUN git clone https://github.com/VOICEVOX/voicevox_engine.git

# Install requirements.txt
RUN pip install --no-cache-dir --upgrade -r voicevox_engine/requirements.txt

# Start the FastAPI app on port 7860, the default port expected by Spaces
CMD ["python", "voicevox_engine/run.py", "--voicelib_dir", "voicevox_core", "--host", "0.0.0.0", "--port", "7860", "--cors_policy_mode", "all"]
#RUN voicevox_engine --download-models