Helsinki-NLP / OPUS-MT-train

Training open neural machine translation models
MIT License
323 stars 40 forks source link

update Dockerfile.gpu--fixed #84

Open gotomypc opened 1 year ago

gotomypc commented 1 year ago
  1. Dockfile.gpu use nvidia/cuda:9.0-devel base image, the key is invalid in current. Reference https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/.

  2. Solution Update the head string from

    FROM nvidia/cuda:9.0-devel
    ENV LANG=C.UTF-8
    RUN apt update && \
    apt upgrade -y && \
    apt install -y ruby wget git cmake g++ libboost-all-dev \
                   doxygen graphviz libblas-dev libopenblas-dev \
           libz-dev libssl-dev zlib1g-dev libbz2-dev liblzma-dev \
           libprotobuf9v5 protobuf-compiler libprotobuf-dev \
           python3-dev python3-numpy python3-setuptools \
           cython3

    To the following:

    
    FROM nvidia/cuda:9.0-devel
    ENV LANG=C.UTF-8

RUN rm -rf /etc/apt/sources.list.d/* RUN apt update && apt install gnupg-curl 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 echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \ echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list RUN apt update && apt upgrade -y && apt install -y ruby wget git cmake g++ libboost-all-dev \ doxygen graphviz libblas-dev libopenblas-dev \ libz-dev libssl-dev zlib1g-dev libbz2-dev liblzma-dev \ libprotobuf9v5 protobuf-compiler libprotobuf-dev \ python3-dev python3-numpy python3-setuptools \ cython3


After modification, the docker file for gpu can be build successfully.