diff options
author | Mark Peschel | 2023-08-19 12:45:38 -0400 |
---|---|---|
committer | Mark Peschel | 2023-08-19 12:45:38 -0400 |
commit | 0be09bce7b2b6eb332209c25a1bd45d0468ac166 (patch) | |
tree | d61d68fe1d61d1198404936a7badcbf88f1c3481 /PKGBUILD | |
parent | fb16167687a7255fd519c791012be6e7c7ba752f (diff) | |
download | aur-0be09bce7b2b6eb332209c25a1bd45d0468ac166.tar.gz |
Warn for /tmp size only if target.lst is big
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 19 insertions, 16 deletions
@@ -153,22 +153,25 @@ build() { # Don't need --config=rocm for tensorflow-upstream, since it's included from .tf_configure.bazelrc export BAZEL_ARGS="--config=opt" - tmp_size=`df /tmp | sed -rn "s|tmpfs +([[:digit:]]+) +.*|\1|p"` - if [ -z "$tmp_size" ]; then - echo Please confirm your /tmp directory is larger than 8 gigabytes\; - echo if it isn\'t, you may run into errors during the build due to running out of space - echo \ if you are building for multiple architectures. - echo Find /tmp size with "df -h". - echo You can remount it larger with "mount -o remount,size=12G /tmp" - echo \ if it is tmpfs and you have enough RAM. - else - if [ "$tmp_size" -lt 8388608 ]; then - echo WARNING: Your /tmp directory is less than 8 gigibytes. - echo You may run into errors during the build due to /tmp running out of space - echo \ if you are building for multiple architectures. - echo You can remount it larger with "mount -o remount,size=12G /tmp" - echo \ if it is tmpfs and you have enough RAM. - fi + if [[ -f /opt/rocm/bin/target.lst && `wc -l < /opt/rocm/bin/target.lst` > 3 ]]; then + # If building for multiple gfx architectures, confirm there's enough space in /tmp. + tmp_size=`df /tmp | sed -rn "s|tmpfs +([[:digit:]]+) +.*|\1|p"` + if [ -z "$tmp_size" ]; then + echo Please confirm your /tmp directory is larger than 8 gigabytes\; + echo if it isn\'t, you may run into errors during the build due to running out of space + echo \ if you are building for multiple architectures. + echo Find /tmp size with "df -h". + echo You can remount it larger with "mount -o remount,size=12G /tmp" + echo \ if it is tmpfs and you have enough RAM. + else + if [ "$tmp_size" -lt 8388608 ]; then + echo WARNING: Your /tmp directory is less than 8 gigibytes. + echo You may run into errors during the build due to /tmp running out of space + echo \ if you are building for multiple architectures. + echo You can remount it larger with "mount -o remount,size=12G /tmp" + echo \ if it is tmpfs and you have enough RAM. + fi + fi fi cd "${srcdir}"/tensorflow-upstream-rocm |