MeowSky49887 commited on
Commit
03a7b4a
·
verified ·
1 Parent(s): dc3f273

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -3
Dockerfile CHANGED
@@ -1,5 +1,27 @@
1
- # Use the official VOICEVOX Engine image
2
- FROM voicevox/voicevox_engine:cpu-latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  # Start the FastAPI app on port 7860, the default port expected by Spaces
5
- CMD ["python", "voicevox_engine/run.py", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use the official Python 3.11.9 image
2
+ FROM python:3.11.9
3
+
4
+ # Set up a new user named "user" with user ID 1000
5
+ RUN useradd -m -u 1000 user
6
+
7
+ # Set the home to the user's home directory and add user's local bin to PATH
8
+ ENV HOME=/home/user \
9
+ PATH=/home/user/.local/bin:$PATH
10
+
11
+ # Switch to the "user" user
12
+ USER user
13
+
14
+ # Create the app directory
15
+ WORKDIR $HOME/app
16
+
17
+ # Copy the application code and the requirements.txt file
18
+ COPY --chown=user . $HOME/app
19
+
20
+ # Clone VOICEVOX Engine from Git Repository
21
+ RUN git clone https://github.com/VOICEVOX/voicevox_engine.git
22
+
23
+ # Install requirements.txt
24
+ RUN pip install --no-cache-dir --upgrade -r voicevox_engine/requirements.txt
25
 
26
  # Start the FastAPI app on port 7860, the default port expected by Spaces
27
+ CMD ["python", "voicevox_engine/run.py", "--voicevox_dir", "linux-cpu", "--host", "0.0.0.0", "--port", "7860"]