Score:0

Could not install LLVM11 in Dockerfile

cf flag

Here Is my Dockerfile

FROM nvidia/cuda:10.2-devel-ubuntu18.04
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH

#ENV DEBIAN_FRONTEND noninteractive 
ENV TZ=Asia/Shanghai
env http_proxy "h/ttp://59.69.112.40:808"
env https_proxy "h/ttp://59.69.112.40:808"
env ftp_proxy "h/ttp://59.69.112.40:808"
ADD sources.list /etc/apt
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN echo exit 0 > /usr/sbin/policy-rc.d
#RUN apt-key adv –no-tty --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --assume-yes apt-utils && apt-get install uuid-runtime  && \
        apt-get install -y cmake && \
        apt-get install -y git dbus && \
        apt-get install -y dbus-user-session &&\
        apt-get install -y packagekit-tools &&\
        apt-get install -y software-properties-common &&\
        apt-get install -y  wget &&\
        echo "这是一个分界线============================" && \
        /etc/init.d/dbus start && \
        apt-get install -y cmake uuid-runtime lsb-release wget software-properties-common && \
      # wget --quiet https://golang.org/dl/go1.16.6.linux-amd64.tar.gz -O ~/go.tar.gz && \
        wget --quiet https://studygolang.com/dl/golang/go1.16.6.linux-amd64.tar.gz -O ~/go.tar.gz && \
        tar xzf ~/go.tar.gz -C /opt/ && \
        ln -s /opt/go/bin/go /usr/local/bin/go && \
        rm ~/go.tar.gz
RUN wget -L   https://apt.llvm.org/llvm-snapshot.gpg.key && \
        apt-key add llvm-snapshot.gpg.key  &&\
       # apt-get install -y clang-11 lldb-11 lld-11 && \
        apt-get install -y clang-11 lldb-11 lld-11 clangd-11 && \
       # echo "这是LLVM============================" && \
       # apt-get update && \
       # apt-get install -y liblldb-11 && \
       # apt-get install -y clang-11 lldb-11 lld-11 clangd-11 && \
        #apt-get install -y python3-liblldb-11 && \
        wget --quiet https://apt.llvm.org/llvm.sh -O ~/llvm.sh && \
        chmod +x ~/llvm.sh && \
        ~/llvm.sh 11 && \
               chmod +x ~/llvm.sh && \
        ~/llvm.sh 11 && \
        rm ~/llvm.sh
RUN wget --quiet https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh -O ~/anaconda.sh && \
        /bin/bash ~/anaconda.sh -b -p /opt/conda && \
        rm ~/anaconda.sh && \
        ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
    echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
    echo "conda activate base" >> ~/.bashrc && \
    /opt/conda/bin/conda clean -afy
RUN conda install -y pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
RUN git clone https://github.com/NVIDIA/apex.git ~/apex && \
        cd ~/apex && \
        bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate && python setup.py install && pip install pyelftools" && \
        rm -rf ~/apex
RUN wget --quiet https://github.com/avast/retdec/releases/download/v4.0/retdec-v4.0-ubuntu-64b.tar.xz -O ~/retdec.tar.xz && \
        tar xf ~/retdec.tar.xz -C /opt/ && \
        ln -s /opt/retdec/bin/retdec-decompiler.py /usr/local/bin/retdec-decompiler && \
        rm ~/retdec.tar.xz
CMD [ "/bin/bash" ]

and this is the problem

Reading package lists...
+ apt-get update
Reading package lists...
+ PKG='clang-11 lldb-11 lld-11 clangd-11'
+ [[ 0 -eq 1 ]]
+ apt-get install -y clang-11 lldb-11 lld-11 clangd-11
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 lldb-11 : Depends: liblldb-11 (>= 1:9~svn298832-1~) but it is not going to be installed
           Depends: python3-lldb-11 but it is not going to be installed

You can see I try to install the package outside but no any problem. That confused me. And the whole env has not Internet so I use proxy.

Score:0
li flag

The Dockerfile you have posted has commented lines, so I'm not sure what you want to execute and what not.

But you should install the dependencies before installing the package, and you sould execute apt-get update before installing too, because your sources changed, and then try your install again.

So, that's how it should be done:

 apt-get update && apt-get install -y liblldb-11 clang-11 lldb-11 lld-11 clangd-11
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.