Use update-alternatives for gcc-10 and g++-10

This commit is contained in:
ReenigneArcher 2021-12-20 23:23:26 -05:00
parent cc4ec1b526
commit 8f78b599ae
2 changed files with 5 additions and 5 deletions

View File

@ -22,9 +22,9 @@ RUN apt-get update -y && \
build-essential \
cmake \
ffmpeg \
gcc-9 \
gcc-10 \
git \
g++-9 \
g++-10 \
libavdevice-dev \
libboost-filesystem-dev \
libboost-log-dev \
@ -36,7 +36,6 @@ RUN apt-get update -y && \
libpulse-dev \
libopus-dev \
libssl-dev \
libstdc++-9 \
libwayland-dev \
libx11-dev \
libxcb-shm0-dev \
@ -48,7 +47,7 @@ RUN apt-get update -y && \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN cp /usr/bin/gcc-9 /usr/bin/gcc && cp /usr/bin/g++-9 /usr/bin/gcc-9
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run
RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run

View File

@ -31,7 +31,8 @@ RUN apt-get update -y && \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN cp /usr/bin/gcc-10 /usr/bin/gcc && cp /usr/bin/g++-10 /usr/bin/gcc-10
# RUN cp /usr/bin/gcc-10 /usr/bin/gcc && cp /usr/bin/g++-10 /usr/bin/gcc-10
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run
RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run