Skip to content

Commit

Permalink
Do not copy libs on every datahub pod boot
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeliton committed Mar 4, 2024
1 parent da9c653 commit e51f49c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions images/scipy-ml-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,10 @@ RUN mkdir -p $CONDA_DIR/lib/nvvm/libdevice && \
cp $CONDA_DIR/nvvm/libdevice/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/
#CUDA 11: cp $CONDA_DIR/lib/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/

# TensorRT fix for tensorflow
# https://github.com/tensorflow/tensorflow/issues/61468 (could not find TensorRT)
# This will most definitely have to be changed after 8.6.1...
RUN ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.8.6.1 && \
ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.8.6.1

RUN . /tmp/activate.sh
5 changes: 0 additions & 5 deletions images/scipy-ml-notebook/tensorrt_env_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
# put tensorrt lib into LD_LIBRARY_PATH
#export LD_LIBRARY_PATH="/opt/conda/lib/python3.11/site-packages/tensorrt:$LD_LIBRARY_PATH"

# https://github.com/tensorflow/tensorflow/issues/61468 (could not find TensorRT)
# This will most definitely have to be changed after 8.6.1...
ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.8.6.1
ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.8.6.1

# tensorrt 8.6+
export LD_LIBRARY_PATH="/opt/conda/lib/python3.11/site-packages/tensorrt:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/opt/conda/lib/python3.11/site-packages/tensorrt_bindings:$LD_LIBRARY_PATH"
Expand Down

0 comments on commit e51f49c

Please sign in to comment.