undetectable/voice-clone
1
1# Use Python 3.10.13 as the base image2FROM python:3.10.13-slim3 4# Set the working directory in the container5WORKDIR /app6 7# Upgrade pip, install git, MeCab and its dependencies8RUN apt-get update \9 && apt-get install -y git mecab libmecab-dev mecab-ipadic mecab-ipadic-utf8 \10 && pip install --upgrade pip11 12# Install PyTorch13RUN pip install torch14 15# Install other dependencies from requirements.txt16COPY requirements.txt /app/17RUN pip install --no-cache-dir -r requirements.txt18 19# List installed packages for debugging20RUN pip list21 22# Copy the rest of your application's code23COPY . /app/24 25# Set the correct permissions for the copied files26RUN chmod -R 777 /app27ENV NUMBA_CACHE_DIR=/tmp 28 29# Replace the librosa files with your custom versions and set permissions30COPY packages/notation.py /usr/local/lib/python3.10/site-packages/librosa/core/notation.py31COPY packages/audio.py /usr/local/lib/python3.10/site-packages/librosa/core/audio.py32COPY packages/constantq.py /usr/local/lib/python3.10/site-packages/librosa/core/constantq.py33COPY packages/filters.py /usr/local/lib/python3.10/site-packages/librosa/filters.py34COPY packages/sequence.py /usr/local/lib/python3.10/site-packages/librosa/sequence.py35COPY utils.py /usr/local/lib/python3.10/site-packages/librosa/feature/utils.py36COPY packages/utils.py /usr/local/lib/python3.10/site-packages/librosa/util/utils.py37COPY packages/matching.py /usr/local/lib/python3.10/site-packages/librosa/util/matching.py38COPY packages/spectrum.py /usr/local/lib/python3.10/site-packages/librosa/core/spectrum.py39COPY packages/pitch.py /usr/local/lib/python3.10/site-packages/librosa/core/pitch.py40RUN chmod -R 777 /usr/local/lib/python3.10/site-packages/librosa \41 && chmod 777 /tmp && mkdir /.local && chmod -R 777 /.local && mkdir /.cache && chmod -R 777 /.cache && \42 mkdir /.config && chmod -R 777 /.config43 44# Set the environment variable for the NUMBA cache directory45 46 47# Expose the port your app runs on48EXPOSE 786049 50# Download UniDic for MeCab51RUN pip install unidic \52 && python -m unidic download53 54# Set the environment variable for Coqui TTS55ENV COQUI_TOS_AGREED=156 57# Apply migrations58RUN python manage.py migrate59 60# Use Django's built-in server to serve the app61CMD ["python3", "manage.py", "runserver", "0.0.0.0:7860"]62 