diff --git a/Dockerfile b/Dockerfile index fad61399c1523e729218ccd54538f406183dbe1b..1c59f209f0c19d697b2d91ca765f57ab54eaa86a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,23 @@ # FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04 -FROM nvidia/driver:460.32.03-ubuntu20.04 +FROM nvidia/driver:460.73.01-ubuntu20.04 ARG DEBIAN_FRONTEND=noninteractive +# Add NVIDIA GPG key to prevent GPG error +# RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub + +# RUN apt-key del 7fa2af80 + +# RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb && \ +# dpkg -i cuda-keyring_1.0-1_all.deb + +RUN apt-key del 7fa2af80 +RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub +RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/7fa2af80.pub + +# RUN rm /etc/apt/sources.list.d/cuda.list +# RUN rm /etc/apt/sources.list.d/nvidia-ml.list + RUN apt-get -y update && apt-get install -y \ build-essential \ cmake \ @@ -53,20 +68,8 @@ RUN pip install setuptools==60.9.3 && \ git clone https://github.com/facebookresearch/segment-anything.git && \ cd segment-anything && pip install -e . && \ pip install opencv-python pycocotools matplotlib onnxruntime onnx && \ - # conda install pytorch torchvision torchaudio cudatoolkit=11.2 -c pytorch -c nvidia - conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia - -# Uncomment the following line if you want to install PyTorch and related packages within the Conda environment -# RUN conda install pytorch torchvision torchaudio cudatoolkit=11.2 -c pytorch -c nvidia + conda install pytorch torchvision torchaudio cudatoolkit=11.2 -c pytorch -c nvidia # Set the default command to bash to activate conda environment on run CMD ["/bin/bash"] -# RUN conda install pytorch torchvision torchaudio cudatoolkit=11.2 -c pytorch -c nvidia - -# RUN conda activate segment_anything_env - - -# RUN conda install pytorch>=1.7 torchvision>=0.8 torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia -#RUN pip3 install ffmpeg gnutls -#RUN pip3 install opencv-python pycocotools matplotlib onnxruntime onnx