-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update pre-install script to tfp 0.25 (#177)
* update pre-install script to tfp 0.25 * fix dtype compatibility * simplify install with optional deps * add python 3.12 to matrix build * remove pkg_resources dep
- Loading branch information
Showing
12 changed files
with
42 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
# Version number for careless | ||
def getVersionNumber(): | ||
import pkg_resources | ||
version = None | ||
try: | ||
from setuptools.version import metadata | ||
|
||
version = pkg_resources.require("careless")[0].version | ||
return version | ||
version = metadata.version("careless") | ||
except ImportError: | ||
from setuptools.version import pkg_resources | ||
|
||
version = pkg_resources.require("careless")[0].version | ||
|
||
return version | ||
|
||
__version__ = getVersionNumber() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,8 @@ | ||
TFP_VERSION=0.24.0 | ||
TF_VERSION=2.16.1 | ||
TFP_VERSION=0.25.0 | ||
TF_VERSION=2.18.0 | ||
|
||
pip install --upgrade pip | ||
|
||
pip install tensorflow[and-cuda]==$TF_VERSION | ||
pip install tensorflow-probability[tf]==$TFP_VERSION tensorflow[and-cuda]==$TF_VERSION | ||
|
||
# The following is a workaround for a bug in tensorflow cuda installation | ||
# https://github.com/tensorflow/tensorflow/issues/63362#issuecomment-2134680575 | ||
mkdir -p $CONDA_PREFIX/etc/conda/activate.d | ||
echo '# Store original LD_LIBRARY_PATH | ||
export ORIGINAL_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" | ||
# Get the CUDNN directory | ||
CUDNN_DIR=$(dirname $(dirname $(python -c "import nvidia.cudnn; print(nvidia.cudnn.__file__)"))) | ||
# Set LD_LIBRARY_PATH to include CUDNN directory | ||
export LD_LIBRARY_PATH=$(find ${CUDNN_DIR}/*/lib/ -type d -printf "%p:")${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | ||
# Get the ptxas directory | ||
PTXAS_DIR=$(dirname $(dirname $(python -c "import nvidia.cuda_nvcc; print(nvidia.cuda_nvcc.__file__)"))) | ||
# Set PATH to include the directory containing ptxas | ||
export PATH=$(find ${PTXAS_DIR}/*/bin/ -type d -printf "%p:")${PATH:+:${PATH}} | ||
'>> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh | ||
|
||
mkdir -p $CONDA_PREFIX/etc/conda/deactivate.d | ||
echo '# Restore original LD_LIBRARY_PATH | ||
export LD_LIBRARY_PATH="${ORIGINAL_LD_LIBRARY_PATH}" | ||
# Unset environment variables | ||
unset CUDNN_DIR | ||
unset PTXAS_DIR' >> $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh | ||
pip install tensorflow[and-cuda]==$TF_VERSION tf_keras | ||
pip install tensorflow-probability[tf]==$TFP_VERSION tensorflow[and-cuda]==$TF_VERSION tf_keras | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters