Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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 |
-
#
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
#
|
24 |
-
# RUN
|
25 |
|
26 |
-
# Give execution permissions
|
27 |
-
RUN chmod +x download.sh
|
28 |
|
29 |
-
#
|
30 |
-
RUN ./download.sh
|
31 |
|
32 |
-
# Clone
|
33 |
-
RUN git clone --branch release-0.
|
34 |
|
35 |
-
#
|
36 |
-
RUN pip install --no-cache-dir --upgrade -r voicevox_engine/requirements.txt
|
37 |
|
38 |
-
#
|
39 |
-
|
40 |
|
41 |
-
#
|
|
|
|
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"]
|