I'm building a docker image and part of it is grabbing this repo:
https://github.com/bytedance/LatentSync/tree/main
And part of the setup is running the shell script to set things up:
#!/bin/bash
# Create a new conda environment
conda create -y -n latentsync python=3.10.13
conda activate latentsync
# Install ffmpeg
conda install -y -c conda-forge ffmpeg
# Python dependencies
pip install -r requirements.txt
# OpenCV dependencies
sudo apt -y install libgl1
# Download the checkpoints required for inference from HuggingFace
huggingface-cli download ByteDance/LatentSync-1.6 whisper/tiny.pt --local-dir checkpoints
huggingface-cli download ByteDance/LatentSync-1.6 latentsync_unet.pt --local-dir checkpoints
In the logs, I see an error:
CondaToSNonInteractiveError: Terms of Service have not been accepted for the following channels. Please accept or remove them before proceeding:
• https://repo.anaconda.com/pkgs/main
• https://repo.anaconda.com/pkgs/r
To accept a channel's Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
‣ conda tos accept --override-channels --channel CHANNEL
To remove channels with rejected Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
‣ conda config --remove channels CHANNEL
CondaError: Run 'conda init' before 'conda activate'
CondaToSNonInteractiveError: Terms of Service have not been accepted for the following channels. Please accept or remove them before proceeding:
• https://repo.anaconda.com/pkgs/main
• https://repo.anaconda.com/pkgs/r
To accept a channel's Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
‣ conda tos accept --override-channels --channel CHANNEL
To remove channels with rejected Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
‣ conda config --remove channels CHANNEL
But the conda instructions are in the setup file, which I can't change. How can I fix this?
In your Dockerfile, you can accept the Terms of Service of the channel by doing the following:
RUN conda tos accept --override-channels --channel CHANNEL
You'll need to replace the CHANNEL
piece with the URL of the channel. In your example, that would look like this:
RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main \
&& RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
You'll need to do this before you run setup.sh
in your Dockerfile.