Skip to content

Commit 6e4c423

Browse files
authored
Remove custom hook that installs TPU deps by default (#1782)
Also modified symlnk-cudnn.sh script to auto-detect cuDNN major version
1 parent 03c29c6 commit 6e4c423

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/container/Dockerfile.maxtext

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ for pattern in \
3030
# tensorflow-cpu,tensorboard,tensorflow-text>=2.19.0 is incompatible with tensorflow==2.18.1
3131
sed -i "${pattern}" ${SRC_PATH_MAXTEXT}/dependencies/requirements/base_requirements/requirements.txt
3232
done
33+
34+
# remove custom build hook that conflicts with our dependencies introduced in
35+
# https://github.com/AI-Hypercomputer/maxtext/commit/de886f9a918d17cfb025a353e7da2bc4d64c26b5
36+
sed -i -e '/^\[tool\.hatch\.build\.targets\.wheel\.hooks\.custom\]$/d' \
37+
-e '/^path = "build_hooks\.py"$/d' \
38+
${SRC_PATH_MAXTEXT}/pyproject.toml
3339
EOF
3440

3541
###############################################################################

.github/container/symlnk-cudnn.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
set -ex
44

5-
CUDNN_MAJOR_VERSION=9
6-
75
# Create a prefix with include/ and lib/ directories containing symlinks to the cuDNN
86
# version that was just installed; this is useful to pass to XLA to avoid it fetching
97
# its own copy of cuDNN.
@@ -20,6 +18,14 @@ if [[ -z "${libcudnn_pkgs}" ]]; then
2018
exit 1
2119
fi
2220

21+
# Auto-detect cuDNN major version from installed packages (e.g., libcudnn9, libcudnn10)
22+
CUDNN_MAJOR_VERSION=$(echo "${libcudnn_pkgs}" | grep -oP 'libcudnn\K\d+' | head -n1)
23+
if [[ -z "${CUDNN_MAJOR_VERSION}" ]]; then
24+
echo "Could not determine CUDNN major version from packages: ${libcudnn_pkgs}"
25+
exit 1
26+
fi
27+
echo "Detected CUDNN major version: ${CUDNN_MAJOR_VERSION}"
28+
2329
for cudnn_file in $(dpkg -L ${libcudnn_pkgs} | sort -u); do
2430
# Skip unversioned symlinks since we'll create our own
2531
if [[ -f "${cudnn_file}" || -h "${cudnn_file}" ]]; then

0 commit comments

Comments
 (0)