File size: 749 Bytes
9da266c
f5a22d8
 
9da266c
 
f5a22d8
9da266c
 
 
f5a22d8
9da266c
 
 
 
 
 
0e15ff8
 
 
9da266c
ec588e5
f5a22d8
 
ec588e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use the official Python 3.11.3 image
FROM python:3.11.3

# 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

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

# Start the FastAPI app on port 7860, the default port expected by Spaces
CMD ["python", "voicevox_nemo_engine/run.py", "--voicevox_dir", "linux-cpu", "--host", "0.0.0.0", "--port", "7860"]