Build fail due to pip install torch

I have transformers[sentencepiece,torch] in the requriements.txt file. When building the space, I get the error " The command ‘/bin/sh -c pip install -r requirements.txt’ returned a non-zero code: 2".

The log has the following information.

Step 18/29 : RUN pip install -r requirements.txt
 ---> Running in 67069f0012d9
Defaulting to user installation because normal site-packages is not writeable
Collecting torch>=1.0
  Downloading torch-1.11.0-cp38-cp38-manylinux1_x86_64.whl (750.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 750.6/750.6 MB 171.1 MB/s eta 0:00:01
ERROR: Exception:

I am not sure what I can do to fix it.


Hey there, I see that your space ended up building without the error :pray: let me know if you run into the issue again…must have been a hiccup.

1 Like