Spaces:
Runtime error
Runtime error
| FROM ubuntu:20.04 | |
| EXPOSE 7860 | |
| RUN apt update | |
| RUN apt install -y python3 python3-pip libsndfile1 wget | |
| # From https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/install.html - step 1 | |
| RUN mkdir --parents --mode=0755 /etc/apt/keyrings | |
| RUN wget https://repo.radeon.com/rocm/rocm.gpg.key -O /tmp/key | |
| RUN gpg --dearmor /tmp/key | |
| RUN cp /tmp/key.gpg /etc/apt/keyrings/rocm.gpg | |
| # From https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/install.html - step 3 - Note using 5.6.1 here | |
| RUN echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/5.6.1 focal main" | tee --append /etc/apt/sources.list.d/rocm.list | |
| RUN echo "Package: *" | tee /etc/apt/preferences.d/rocm-pin-600 | |
| RUN echo "Pin: release o=repo.radeon.com" | tee --append /etc/apt/preferences.d/rocm-pin-600 | |
| RUN echo "Pin-Priority: 600" | tee --append /etc/apt/preferences.d/rocm-pin-600 | |
| RUN apt update | |
| # From https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/install.html - step 4 | |
| RUN apt install -y rocm-hip-sdk | |
| COPY ./tortoise-tts /app | |
| # These are probably not needed | |
| ENV HOME "/root" | |
| #ENV CONDA_DIR "${HOME}/miniconda" | |
| #ENV PATH="$CONDA_DIR/bin":$PATH | |
| #ENV CONDA_AUTO_UPDATE_CONDA=false | |
| ENV PIP_DOWNLOAD_CACHE="$HOME/.pip/cache" | |
| ENV TORTOISE_MODELS_DIR="$HOME/tortoise-tts/build/lib/tortoise/models" | |
| WORKDIR /app | |
| RUN python3 -m pip install -r ./requirements.txt | |
| # I could probalby change the requirements.txt to install these in one go, but this works | |
| RUN pip3 uninstall torch torchaudio -y | |
| RUN pip3 install torch torchaudio --index-url https://download.pytorch.org/whl/rocm5.2 | |
| RUN python3 setup.py install |