@@ -27,9 +27,11 @@ WORKDIR /root/workspace
27
27
ENV FORCE_CUDA="1"
28
28
29
29
# 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
31
31
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
33
35
34
36
# install cuda cudnn
35
37
RUN 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
46
48
tar -xzvf onnxruntime.tgz &&\
47
49
rm onnxruntime.tgz &&\
48
50
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 &&\
49
55
curl -fsSL -v -o ./tensorrt.tgz -O $TENSORRT_URL &&\
50
56
tar -xzvf ./tensorrt.tgz &&\
51
57
rm -f ./tensorrt.tgz &&\
@@ -56,10 +62,11 @@ RUN curl -fsSL -v -o ./onnxruntime.tgz -O https://github.com/microsoft/onnxrunti
56
62
ENV CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
57
63
ENV CUDNN_DIR=/opt/cudnn
58
64
ENV ONNXRUNTIME_DIR=/opt/onnxruntime
65
+ ENV ONNXRUNTIME_GPU_DIR=/opt/onnxruntime-gpu
59
66
ENV TENSORRT_DIR=/opt/TensorRT
60
67
61
68
ENV 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
63
70
ENV PATH=$TENSORRT_DIR/bin:$PATH
64
71
65
72
# ## install ppl.cv
@@ -106,7 +113,7 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
106
113
/opt/conda/envs/torch${TORCH_VERSION}/bin/pip install --no-cache-dir torch==${TORCH_VERSION}+cu${CUDA_INT} \
107
114
torchvision==${TORCHVISION_VERSION}+cu${CUDA_INT} -f https://download.pytorch.org/whl/torch_stable.html &&\
108
115
/opt/conda/bin/conda init bash &&\
109
- /opt/conda/bin/conda clean -ya &&\
116
+ /opt/conda/bin/conda clean -ya
110
117
111
118
ENV CONDA=/opt/conda
112
119
ENV PATH=$CONDA/bin:$PATH
0 commit comments