FROM ubuntu:22.04 ENV PIP_ROOT_USER_ACTION=ignore WORKDIR /tmp/ COPY requirements.txt packages.txt ./ RUN apt-get -y update && apt-get -y upgrade RUN xargs apt -y install < packages.txt RUN wget -v https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb && dpkg -i cuda-keyring_1.1-1_all.deb && apt-get -y update && apt-get -y install cuda-toolkit-12-8 RUN wget -v https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb && dpkg -i cuda-keyring_1.1-1_all.deb && apt-get -y update && apt-get -y install cudnn RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 RUN rm -f /usr/lib/python3.12/EXTERNALLY-MANAGED RUN pip3 install --no-cache-dir -r requirements.txt RUN apt-get clean RUN rm -rf /tmp/* CMD ["bash"]