gpu dockerfile, fix a little case

pull/2127/head
18001307871@163.com 2 years ago
parent d31c9b6e8a
commit 6dc1e711ed

@ -31,33 +31,34 @@ RUN echo "set meta-flag on" >> /etc/inputrc && echo "set convert-meta off" >> /e
ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LANGUAGE=en_US.UTF-8 TZ=Asia/Shanghai
RUN wget https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz && tar xvf Python-3.6.15.tgz && \
cd Python-3.6.15 && ./configure --prefix=/home/paddle/python3.6 && make -j8 && make install && \
rm -rf ../Python-3.6.15 ../Python-3.6.15.tgz && chown -R paddle:paddle /home/paddle/python3.6
# official download site: https://cdn.npmmirror.com/binaries/python/3.7.13/Python-3.7.13.tgz
RUN wget https://cdn.npmmirror.com/binaries/python/3.7.13/Python-3.7.13.tgz && tar xvf Python-3.7.13.tgz && \
cd Python-3.7.13 && ./configure --prefix=/home/paddle/python3.7 && make -j8 && make install && \
rm -rf ../Python-3.7.13 ../Python-3.7.13.tgz && chown -R paddle:paddle /home/paddle/python3.7
RUN wget https://mirrors.sjtug.sjtu.edu.cn/gnu/gmp/gmp-6.1.0.tar.bz2 && tar xvf gmp-6.1.0.tar.bz2 && \
RUN cd /tmp && wget https://mirrors.sjtug.sjtu.edu.cn/gnu/gmp/gmp-6.1.0.tar.bz2 && tar xvf gmp-6.1.0.tar.bz2 && \
cd gmp-6.1.0 && ./configure --prefix=/usr/local && make -j8 && make install && \
rm -rf ../gmp-6.1.0.tar.bz2 ../gmp-6.1.0 && cd .. && \
rm -rf ../gmp-6.1.0.tar.bz2 ../gmp-6.1.0 && cd /tmp && \
wget https://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2 && tar xvf mpfr-3.1.4.tar.bz2 && cd mpfr-3.1.4 && \
./configure --prefix=/usr/local && make -j8 && make install && rm -rf ../mpfr-3.1.4.tar.bz2 ../mpfr-3.1.4 && \
cd .. && wget https://mirrors.sjtug.sjtu.edu.cn/gnu/mpc/mpc-1.0.3.tar.gz && tar xvf mpc-1.0.3.tar.gz && \
cd /tmp && wget https://mirrors.sjtug.sjtu.edu.cn/gnu/mpc/mpc-1.0.3.tar.gz && tar xvf mpc-1.0.3.tar.gz && \
cd mpc-1.0.3 && ./configure --prefix=/usr/local && make -j8 && make install && \
rm -rf ../mpc-1.0.3.tar.gz ../mpc-1.0.3 && cd .. && \
rm -rf ../mpc-1.0.3.tar.gz ../mpc-1.0.3 && cd /tmp && \
wget http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/isl-0.18.tar.bz2 && \
tar xvf isl-0.18.tar.bz2 && cd isl-0.18 && ./configure --prefix=/usr/local && make -j8 && make install \
&& rm -rf ../isl-0.18.tar.bz2 ../isl-0.18 && cd .. && \
&& rm -rf ../isl-0.18.tar.bz2 ../isl-0.18 && cd /tmp && \
wget http://mirrors.ustc.edu.cn/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz --no-check-certificate && \
tar xvf gcc-8.2.0.tar.gz && cd gcc-8.2.0 && UNSET LIBRARY_PATH && ./configure --prefix=/home/paddle/gcc82 \
tar xvf gcc-8.2.0.tar.gz && cd gcc-8.2.0 && unset LIBRARY_PATH && ./configure --prefix=/home/paddle/gcc82 \
--enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local \
--with-mpfr=/usr/local --with-mpc=/usr/local --with-isl=/usr/local && make -j8 && make install && \
rm -rf ../gcc-8.2.0.tar.gz ../gcc-8.2.0 && chown -R paddle:paddle /home/paddle/gcc82
WORKDIR /home/paddle
USER paddle
ENV PATH=/home/paddle/python3.6/bin:/home/paddle/gcc82/bin \
ENV PATH=/home/paddle/python3.7/bin:/home/paddle/gcc82/bin:${PATH} \
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/cuda-11.2/targets/x86_64-linux/lib:${LD_LIBRARY_PATH}
RUN mkdir ~/.pip && echo "" > ~/.pip/pip.conf && echo "[global]" > ~/.pip/pip.conf && \
RUN mkdir -p ~/.pip && echo "[global]" > ~/.pip/pip.conf && \
echo "index-url=https://mirror.baidu.com/pypi/simple" >> ~/.pip/pip.conf && \
echo "trusted-host=mirror.baidu.com" >> ~/.pip/pip.conf && \
python3 -m pip install --upgrade pip && \

Loading…
Cancel
Save