@@ -27,9 +27,11 @@ WORKDIR /root/workspace
2727ENV FORCE_CUDA="1"
2828
2929# install toolset
30- RUN yum install devtoolset-${TOOLSET_VERSION}-gcc devtoolset-${TOOLSET_VERSION}-gcc-c++ -y
30+ RUN yum install centos-release-scl devtoolset-${TOOLSET_VERSION}-gcc* -y
3131
32- ENV PATH=/opt/rh/devtoolset-${TOOLSET_VERSION}/root/usr/bin:$PATH
32+ ENV TOOLSET_DIR=/opt/rh/devtoolset-${TOOLSET_VERSION}/root/usr
33+ ENV PATH=$TOOLSET_DIR/bin:$PATH
34+ ENV LD_LIBRARY_PATH=$TOOLSET_DIR/lib:$TOOLSET_DIR/lib64:/usr/local/lib64
3335
3436# install cuda cudnn
3537RUN curl -fsSL -v -o ./cuda_install.run -O $CUDA_URL &&\
@@ -46,6 +48,10 @@ RUN curl -fsSL -v -o ./onnxruntime.tgz -O https://github.com/microsoft/onnxrunti
4648 tar -xzvf onnxruntime.tgz &&\
4749 rm onnxruntime.tgz &&\
4850 mv onnxruntime* /opt/onnxruntime &&\
51+ curl -fsSL -v -o ./onnxruntime.tgz -O https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/onnxruntime-linux-x64-gpu-${ONNXRUNTIME_VERSION}.tgz &&\
52+ tar -xzvf onnxruntime.tgz &&\
53+ rm onnxruntime.tgz &&\
54+ mv onnxruntime* /opt/onnxruntime-gpu &&\
4955 curl -fsSL -v -o ./tensorrt.tgz -O $TENSORRT_URL &&\
5056 tar -xzvf ./tensorrt.tgz &&\
5157 rm -f ./tensorrt.tgz &&\
@@ -56,10 +62,11 @@ RUN curl -fsSL -v -o ./onnxruntime.tgz -O https://github.com/microsoft/onnxrunti
5662ENV CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
5763ENV CUDNN_DIR=/opt/cudnn
5864ENV ONNXRUNTIME_DIR=/opt/onnxruntime
65+ ENV ONNXRUNTIME_GPU_DIR=/opt/onnxruntime-gpu
5966ENV TENSORRT_DIR=/opt/TensorRT
6067
6168ENV LD_LIBRARY_PATH=$CUDA_TOOLKIT_ROOT_DIR/lib64:$CUDNN_DIR/lib64:$LD_LIBRARY_PATH
62- ENV LD_LIBRARY_PATH=${ONNXRUNTIME_DIR }/lib:$TENSORRT_DIR/lib:$LD_LIBRARY_PATH
69+ ENV LD_LIBRARY_PATH=${ONNXRUNTIME_GPU_DIR }/lib:$TENSORRT_DIR/lib:$LD_LIBRARY_PATH
6370ENV PATH=$TENSORRT_DIR/bin:$PATH
6471
6572# ## install ppl.cv
@@ -106,7 +113,7 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
106113 /opt/conda/envs/torch${TORCH_VERSION}/bin/pip install --no-cache-dir torch==${TORCH_VERSION}+cu${CUDA_INT} \
107114 torchvision==${TORCHVISION_VERSION}+cu${CUDA_INT} -f https://download.pytorch.org/whl/torch_stable.html &&\
108115 /opt/conda/bin/conda init bash &&\
109- /opt/conda/bin/conda clean -ya &&\
116+ /opt/conda/bin/conda clean -ya
110117
111118ENV CONDA=/opt/conda
112119ENV PATH=$CONDA/bin:$PATH
0 commit comments