I follow the descriptions on here: https://github.com/pytorch/pytorch#from-source to compile the pytorch on linux.
I compiled in a conda env.
But I encountered a permission denied error. The log is:
[70/3523] Performing build step for 'nccl_external'
FAILED: nccl_external-prefix/src/nccl_external-stamp/nccl_external-build nccl/lib/libnccl_static.a
cd /home/wangshihao/PycharmProjects/hrnet/pytorch/third_party/nccl/nccl && env CCACHE_DISABLE=1 SCCACHE_DISABLE=1 make CXX=/usr/local/bin/c++ CUDA_HOME=/usr/local/cuda NVCC=/usr/local/cuda/bin/nvcc NVCC_GENCODE=-gencode=arch=compute_75,code=sm_75 BUILDDIR=/home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl VERBOSE=0 -j && /home/wangshihao/miniconda3/envs/hrnet/bin/cmake -E touch /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl_external-prefix/src/nccl_external-stamp/nccl_external-build
make -C src build BUILDDIR=/home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl
make[1]: Entering directory `/home/wangshihao/PycharmProjects/hrnet/pytorch/third_party/nccl/nccl/src'
Grabbing   include/nccl_net.h                  > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/include/nccl_net.h
Generating nccl.h.in                           > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/include/nccl.h
Compiling  init.cc                             > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/init.o
Compiling  channel.cc                          > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/channel.o
Compiling  bootstrap.cc                        > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/bootstrap.o
Compiling  transport.cc                        > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport.o
Compiling  enqueue.cc                          > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/enqueue.o
Compiling  misc/group.cc                       > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/group.o
Compiling  misc/nvmlwrap.cc                    > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/nvmlwrap.o
Compiling  misc/ibvwrap.cc                     > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/ibvwrap.o
Compiling  misc/rings.cc                       > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/rings.o
Compiling  misc/utils.cc                       > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/utils.o
Compiling  misc/argcheck.cc                    > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/argcheck.o
Compiling  misc/trees.cc                       > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/trees.o
Compiling  misc/topo.cc                        > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/misc/topo.o
Compiling  transport/p2p.cc                    > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/p2p.o
Compiling  transport/shm.cc                    > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/shm.o
Compiling  transport/net.cc                    > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/net.o
Compiling  transport/net_socket.cc             > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/net_socket.o
Compiling  transport/net_ib.cc                 > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/transport/net_ib.o
Compiling  collectives/all_reduce.cc           > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/all_reduce.o
Compiling  collectives/all_gather.cc           > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/all_gather.o
Compiling  collectives/broadcast.cc            > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/broadcast.o
Compiling  collectives/reduce.cc               > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/reduce.o
Compiling  collectives/reduce_scatter.cc       > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/reduce_scatter.o
Generating nccl.pc.in                          > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/lib/pkgconfig/nccl.pc
make[2]: Entering directory `/home/wangshihao/PycharmProjects/hrnet/pytorch/third_party/nccl/nccl/src/collectives/device'
Generating rules                               > /home/wangshihao/PycharmProjects/hrnet/pytorch/build/nccl/obj/collectives/device/Makefile.rules
/bin/sh: ./gen_rules.sh: Permission denied

Can anyone help me? Thank you very much~