Skip to content

Commit

Permalink
Clean up existing swapfile before trying to allocate a new one (#6066)
Browse files Browse the repository at this point in the history
Fix a potential bug from
#6058, here is what I see in
the CI when it happens
https://github.com/pytorch/pytorch/actions/runs/12360769784/job/34497379880?pr=143316#step:5:165
  • Loading branch information
huydhn authored Dec 16, 2024
1 parent 9bf99ca commit dc41aa1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ fi

${post_install}

# Cleanup any existing swapfile just to be sure
sudo swapoff /swapfile
sudo rm /swapfile
# before allocating a new one
sudo fallocate -l 3G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
Expand Down

0 comments on commit dc41aa1

Please sign in to comment.