I’m working on getting an LLM into a Docker image:
and I’m seeing some errors in the build log:
ERROR: Ignored the following yanked versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3
ERROR: Could not find a version that satisfies the requirement torchvision==0.20.1 (from versions: 0.1.6, 0.2.0, 0.21.0, 0.22.0, 0.22.1)
ERROR: No matching distribution found for torchvision==0.20.1
This is my Dockerfile:
FROM ubuntu:latest
ARG PYTHON_VERSION=3.10.13
SHELL ["/bin/bash", "-c"]
RUN apt-get update && apt-get install -y git
# Install base utilities
RUN apt-get update \
&& apt-get install -y build-essential \
&& apt-get install -y wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get -y install sudo
# Install miniconda
ENV CONDA_DIR=/opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
# Put conda in path so we can use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH
RUN pip install --upgrade pip
RUN pip install -U "huggingface_hub[cli]"
WORKDIR /app
RUN git clone https://github.com/bytedance/LatentSync.git
WORKDIR "LatentSync"
RUN conda tos accept --override-channels --channel defaults
RUN conda init
RUN source setup_env.sh
The package actually exists, but I guess it could have problems with your platform. I could install the exact version of the torchvision package manually on amd64 Linux and arm64 Linux. I could not test it in containers yet.
Update:
I tested it in containers. It looks like the package is not compatible with the official python docker images. I trid the alpine based and the debian based too. I then started an Ubuntu container and installed python3 in it. That worked. I’m not sure what is missing from the debian and alpine or if it is something that can be installed to fix it. You could try asking the maintainers of the github repo. If they have any idea what the package requires we can help to fix it in containers..
You are right. I missed that first line, I focused on the package name. Try without installing any dependency, just start the ubuntu container and install python and that single package. That worked for me. If it works for you, then one of the packages you install could cause the issue. Maybe something in build-essential or anything else. Try adding those one by one and test if the installation still works. I have no better idea.