soiz1 commited on
Commit
aa07ded
·
verified ·
1 Parent(s): c190938

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -15
Dockerfile CHANGED
@@ -1,6 +1,10 @@
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
 
@@ -17,25 +21,38 @@ WORKDIR $HOME/app
17
  # Copy the application code and the requirements.txt file
18
  COPY --chown=user . $HOME/app
19
 
20
- # Download VOICEVOX Core v0.15.0's download.sh script
21
- RUN curl -sSfL https://github.com/VOICEVOX/voicevox_core/releases/download/0.15.0/download.sh -o download.sh
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
- # If 404 error occurs on the open_jtalk dictionary URL, uncomment below line to use jaist mirror
24
- # RUN sed -i 's|https://downloads.sourceforge.net/project/open-jtalk/Dictionary/open_jtalk_dic-1.11/open_jtalk_dic_utf_8-1.11.tar.gz|https://jaist.dl.sourceforge.net/project/open-jtalk/Dictionary/open_jtalk_dic-1.11/open_jtalk_dic_utf_8-1.11.tar.gz|' download.sh
25
 
26
- # Give execution permissions to the download script
27
- RUN chmod +x download.sh
28
 
29
- # Run the download script to install VOICEVOX Core and dictionaries
30
- RUN ./download.sh
31
 
32
- # Clone VOICEVOX Engine repository (release-0.15 branch)
33
- RUN git clone --branch release-0.15 https://github.com/VOICEVOX/voicevox_engine.git
34
 
35
- # Install Python dependencies for VOICEVOX Engine
36
- RUN pip install --no-cache-dir --upgrade -r voicevox_engine/requirements.txt
37
 
38
- # Start the FastAPI app on port 7860, with all models loaded and CORS policy set to allow all origins
39
- CMD ["python", "voicevox_engine/run.py", "--voicelib_dir", "voicevox_core", "--host", "0.0.0.0", "--port", "7860", "--cors_policy_mode", "all", "--load_all_models"]
40
 
41
- #RUN voicevox_engine --download-models
 
 
1
  # Use the official Python 3.11.9 image
2
  FROM python:3.11.9
3
 
4
+ # Install some dependencies
5
+ RUN apt-get update && apt-get install -y jq
6
+ RUN apt-get update && apt-get install -y tree
7
+
8
  # Set up a new user named "user" with user ID 1000
9
  RUN useradd -m -u 1000 user
10
 
 
21
  # Copy the application code and the requirements.txt file
22
  COPY --chown=user . $HOME/app
23
 
24
+ # ---------- Important! https://github.com/VOICEVOX/voicevox_core/issues/1000 ----------
25
+
26
+ # Download VOICEVOX Core from latest Release
27
+ RUN curl -sSfL https://github.com/VOICEVOX/voicevox_core/releases/latest/download/download-linux-x64 --output download
28
+
29
+ # Give execution permissions
30
+ RUN chmod +x ./download
31
+
32
+ # Install VOICEVOX Core
33
+ RUN ./download --output voicevox_core
34
+
35
+ # Clone VOICEVOX Engine from Master Branch
36
+ RUN git clone --branch master https://github.com/VOICEVOX/voicevox_engine.git voicevox_engine
37
+
38
+ # ---------- Important! Temporary Downgrade to 0.15.x ----------
39
 
40
+ # Download VOICEVOX Core from 0.15.7 Release
41
+ # RUN curl -sSfL https://github.com/VOICEVOX/voicevox_core/releases/download/0.15.7/download.sh --output download.sh
42
 
43
+ # Give execution permissions
44
+ # RUN chmod +x ./download.sh
45
 
46
+ # Install VOICEVOX Core
47
+ # RUN ./download.sh --output voicevox_core --version 0.15.7
48
 
49
+ # Clone VOICEVOX Engine from 0.23.0 Repository
50
+ # RUN git clone --branch release-0.23 https://github.com/VOICEVOX/voicevox_engine.git voicevox_engine
51
 
52
+ # ---------- Important! https://github.com/VOICEVOX/voicevox_engine/issues/1568 ----------
 
53
 
54
+ # Install requirements.txt
55
+ RUN pip install --requirement voicevox_engine/requirements.txt
56
 
57
+ # Start the FastAPI app on port 7860, the default port expected by Spaces
58
+ CMD ["python", "voicevox_engine/run.py", "--voicelib_dir", "voicevox_core", "--host", "0.0.0.0", "--port", "7860", "--cors_policy_mode", "all"]