Spaces:
Build error
Build error
File size: 2,009 Bytes
03a7b4a c06f618 4bea5f2 c06f618 4b6a96b 03a7b4a 1ee3088 06c10ea d2957e3 7e69488 d2957e3 7e69488 d2957e3 03a7b4a 2ac0ddc d2957e3 1ee3088 d2957e3 1ee3088 25d69e1 d2957e3 1ee3088 d2957e3 f5a22d8 2ac0ddc d2957e3 2ac0ddc 02b7546 c06f618 2ac0ddc a9a732f 2ac0ddc ee51ca9 a9a732f |
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# Use the official Python 3.11.9 image
FROM python:3.11.9
# Install some dependencies
RUN apt-get update && apt-get install -y jq
RUN apt-get update && apt-get install -y tree
# 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
# ---------- Important! https://github.com/VOICEVOX/voicevox_core/issues/1000 ----------
# Download VOICEVOX Core from latest Release
RUN curl -sSfL https://github.com/VOICEVOX/voicevox_core/releases/latest/download/download-linux-x64 --output download
# Give execution permissions
RUN chmod +x ./download
# Install VOICEVOX Core
RUN ./download --output voicevox_core
# Clone VOICEVOX Engine from Master Branch
RUN git clone --branch master https://github.com/VOICEVOX/voicevox_engine.git voicevox_engine
# ---------- Important! Temporary Downgrade to 0.15.x ----------
# Download VOICEVOX Core from 0.15.7 Release
# RUN curl -sSfL https://github.com/VOICEVOX/voicevox_core/releases/download/0.15.7/download.sh --output download.sh
# Give execution permissions
# RUN chmod +x ./download.sh
# Install VOICEVOX Core
# RUN ./download.sh --output voicevox_core --version 0.15.7
# Clone VOICEVOX Engine from 0.23.0 Repository
# RUN git clone --branch release-0.23 https://github.com/VOICEVOX/voicevox_engine.git voicevox_engine
# ---------- Important! https://github.com/VOICEVOX/voicevox_engine/issues/1568 ----------
# Install requirements.txt
RUN pip install --requirement 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"] |