Skip to content

Commit

Permalink
Fixed minor path error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Rodríguez Flores committed May 23, 2024
1 parent 5734aef commit f83d5a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packaging/rpm/rb-aioutliers.spec
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ source /opt/rb-aioutliers/aioutliers/bin/activate
pip3 install -r /opt/rb-aioutliers/resources/src/requirements.txt

# Add NVIDIA libraries to LD_LIBRARY_PATH (Necessary for using TensorFlow with GPU)
cp /opt/rb-aioutliers/resources/src/setup_tensorflow_and_cuda.sh /opt/rb-aioutliers/bin/setup_tensorflow_and_cuda.sh
cp /opt/rb-aioutliers/resources/src/setup_tensorflow_and_cuda.sh /opt/rb-aioutliers/aioutliers/bin/setup_tensorflow_and_cuda.sh

# Append the sourcing of setup script to activate script
echo "source /opt/rb-aioutliers/bin/setup_tensorflow_and_cuda.sh" | tee -a /opt/rb-aioutliers/aioutliers/bin/activate
echo "source /opt/rb-aioutliers/aioutliers/bin/setup_tensorflow_and_cuda.sh" | tee -a /opt/rb-aioutliers/aioutliers/bin/activate

# Deactivate and reactivate to apply changes
deactivate
Expand Down
3 changes: 1 addition & 2 deletions resources/src/setup_tensorflow_and_cuda.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

# Set the base directory for NVIDIA packages within the virtual environment using wildcard for Python version
NVIDIA_PACKAGE_DIR="$(echo "$VIRTUAL_ENV")/lib/python*/site-packages/nvidia"
echo $NVIDIA_PACKAGE_DIR
NVIDIA_PACKAGE_DIR="$VIRTUAL_ENV/lib/python*/site-packages/nvidia"
# Export LD_LIBRARY_PATH for each lib directory found in the NVIDIA_PACKAGE_DIR
for dir in $NVIDIA_PACKAGE_DIR/*; do
if [ -d "$dir/lib" ]; then
Expand Down

0 comments on commit f83d5a4

Please sign in to comment.