Host system freezing while trying to install pytorch from souce

I am trying to install pytorch from source with cuda 12.4 and when i run the command
“python setup.py develop” my system freezes after few minutes.
How can i address this issue ?
I have 16gb ram gtx 1660 ti

You might be running out of memory during the build and could reduce the number of jobs via export MAX_JOBS=N for e.g. N=4.

Should I write it like export MAX_JOBS=4 python setup.py develop and then run the command in terminal?