llm-foundry icon indicating copy to clipboard operation
llm-foundry copied to clipboard

How to install torch 1.13.1+cu117?

Open ighodgao opened this issue 1 year ago • 3 comments

pip3 install torch does not install torch + support for cuda 11.7. Therefore I'm not able to install all requirements in a new venv. pip list lists that torch version is 1.13.1, not 1.13.1_cu117. I'm on WSL on Windows (Ubuntu 22.04)

`(llmfoundry-venv) ighodgao@isha-determined:~/llm-foundry$ pip install .[gpu] Processing /home/ighodgao/llm-foundry Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting xentropy-cuda-lib@ git+https://github.com/HazyResearch/[email protected]#subdirectory=csrc/xentropy Cloning https://github.com/HazyResearch/flash-attention.git (to revision v0.2.8) to /tmp/pip-install-f5ns9hrp/xentropy-cuda-lib_1cb623aeb89f429dbb3595be2c38f9c1 Running command git clone --filter=blob:none --quiet https://github.com/HazyResearch/flash-attention.git /tmp/pip-install-f5ns9hrp/xentropy-cuda-lib_1cb623aeb89f429dbb3595be2c38f9c1 Running command git checkout -q 33e0860c9c5667fded5af674882e731909096a7f Resolved https://github.com/HazyResearch/flash-attention.git to commit 33e0860c9c5667fded5af674882e731909096a7f Running command git submodule update --init --recursive -q Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [13 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-f5ns9hrp/xentropy-cuda-lib_1cb623aeb89f429dbb3595be2c38f9c1/csrc/xentropy/setup.py", line 98, in raise_if_cuda_home_none("--xentropy") File "/tmp/pip-install-f5ns9hrp/xentropy-cuda-lib_1cb623aeb89f429dbb3595be2c38f9c1/csrc/xentropy/setup.py", line 48, in raise_if_cuda_home_none raise RuntimeError( RuntimeError: --xentropy was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.

  torch.__version__  = 1.13.1+cu117


  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.`

ighodgao avatar May 10 '23 16:05 ighodgao

you could start with this img: mosaicml/pytorch:1.13.1_cu117-python3.10-ubuntu20.04 from here

vchiley avatar May 10 '23 16:05 vchiley

You can also install like this:

pip install --no-cache-dir --find-links https://download.pytorch.org/whl/torch_stable.html torch==1.13.1+cu117

abhi-mosaic avatar May 10 '23 16:05 abhi-mosaic

You can also install like this:

pip install --no-cache-dir --find-links https://download.pytorch.org/whl/torch_stable.html torch==1.13.1+cu117

This did install 1.13.1+cu117 but still running into the same error when running pip install .[gpu] - trying the docker solution

ighodgao avatar May 10 '23 16:05 ighodgao

Hi @ighodgao, closing this issue for now but feel free to reopen if you need assistance with Docker or getting installation to work.

abhi-mosaic avatar May 17 '23 22:05 abhi-mosaic