uoguelph-mlrg / PROTAX-GPU

GPU-accelerated DNA barcode classification
Other
8 stars 1 forks source link

Installation Problem #29

Closed dylanstephen-s closed 4 days ago

dylanstephen-s commented 5 days ago

Hello I have been trying to install PROTAX-CPU on an HPC Cluster using a conda env, but I have ran into an issue with the final command: pip install .

I tried with Python version 10, and since it didn't work I noticed on a previous push that it was mentioned to try version 12. Any help would be appreciated.

(protax) [dstephen@gruffalo PROTAX-GPU]$ pip install . Processing /mnt/shared/projects/rbge/dstephen/tools/PROTAX-GPU Preparing metadata (setup.py) ... done Requirement already satisfied: jax in /mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages (from protax==0.0.0) (0.4.35) Requirement already satisfied: jaxlib in /mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages (from protax==0.0.0) (0.4.35) Requirement already satisfied: ml-dtypes>=0.4.0 in /mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages (from jax->protax==0.0.0) (0.5.0) Requirement already satisfied: numpy>=1.24 in /mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages (from jax->protax==0.0.0) (2.1.3) Requirement already satisfied: opt-einsum in /mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages (from jax->protax==0.0.0) (3.4.0) Requirement already satisfied: scipy>=1.10 in /mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages (from jax->protax==0.0.0) (1.14.1) Building wheels for collected packages: protax Building wheel for protax (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [89 lines of output] running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-312/protax copying src/protax/model.py -> build/lib.linux-x86_64-cpython-312/protax copying src/protax/init.py -> build/lib.linux-x86_64-cpython-312/protax copying src/protax/classify.py -> build/lib.linux-x86_64-cpython-312/protax copying src/protax/baseline.py -> build/lib.linux-x86_64-cpython-312/protax copying src/protax/taxonomy.py -> build/lib.linux-x86_64-cpython-312/protax copying src/protax/protax_utils.py -> build/lib.linux-x86_64-cpython-312/protax creating build/lib.linux-x86_64-cpython-312/knn_jax copying src/knn_jax/knn_jax.py -> build/lib.linux-x86_64-cpython-312/knn_jax copying src/knn_jax/init.py -> build/lib.linux-x86_64-cpython-312/knn_jax running egg_info writing protax.egg-info/PKG-INFO writing dependency_links to protax.egg-info/dependency_links.txt writing requirements to protax.egg-info/requires.txt writing top-level names to protax.egg-info/top_level.txt reading manifest file 'protax.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'protax.egg-info/SOURCES.txt' running build_ext -- The CXX compiler identification is GNU 8.5.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CMake version 3.30.5 /mnt/shared/projects/rbge/dstephen/tools/PROTAX-GPU -- Found Python: /mnt/shared/scratch/dstephen/apps/conda/envs/protax/bin/python3.12 (found version "3.12.7") found components: Interpreter Development Development.Module Development.Embed -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- Found pybind11: /mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/pybind11/include (found version "2.13.6") CMake Error at /mnt/shared/scratch/dstephen/apps/conda/envs/protax/share/cmake-3.30/Modules/Internal/CMakeCUDAFindToolkit.cmake:104 (message): Failed to find nvcc.

    Compiler requires the CUDA toolkit.  Please set the CUDAToolkit_ROOT
    variable.
  Call Stack (most recent call first):
    /mnt/shared/scratch/dstephen/apps/conda/envs/protax/share/cmake-3.30/Modules/CMakeDetermineCUDACompiler.cmake:85 (cmake_cuda_find_toolkit)
    CMakeLists.txt:17 (enable_language)

  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/mnt/shared/projects/rbge/dstephen/tools/PROTAX-GPU/setup.py", line 107, in <module>
      setup(
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 183, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
      dist.run_commands()
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
      self.run_command(cmd)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/dist.py", line 999, in run_command
      super().run_command(command)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 410, in run
      self.run_command("build")
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/dist.py", line 999, in run_command
      super().run_command(command)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/dist.py", line 999, in run_command
      super().run_command(command)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 98, in run
      _build_ext.run(self)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
      self.build_extensions()
    File "/mnt/shared/projects/rbge/dstephen/tools/PROTAX-GPU/setup.py", line 65, in build_extensions
      subprocess.check_call(["cmake", HERE] + cmake_args, cwd=self.build_temp)
    File "/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/mnt/shared/projects/rbge/dstephen/tools/PROTAX-GPU', '-DCMAKE_INSTALL_PREFIX=/mnt/shared/projects/rbge/dstephen/tools/PROTAX-GPU/build/lib.linux-x86_64-cpython-312', '-DPython_EXECUTABLE=/mnt/shared/scratch/dstephen/apps/conda/envs/protax/bin/python3.12', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_PREFIX_PATH=/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/python3.12/site-packages/pybind11/share/cmake/pybind11', '-DPython_LIBRARIES=/mnt/shared/scratch/dstephen/apps/conda/envs/protax/lib/libpython3.12.a', '-DPython_INCLUDE_DIRS=/mnt/shared/scratch/dstephen/apps/conda/envs/protax/include/python3.12']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for protax Running setup.py clean for protax Failed to build protax ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (protax)

gwtaylor commented 4 days ago

Hi @dylanstephen-s, the code in the main branch currently has an issue with CPU fallback on Linux. There is an open pull request #27 that attempts to address the issue. We are still tidying it up and it will be eventually merged to main. I encourage you to clone the code from the open PR and see if it addresses the issue. Feel free to add your feedback there. Duplicate of #26

gwtaylor commented 1 day ago

@dylanstephen-s We have merged #27 to main so you should not need to worry about checking out that branch. Just pull from main and you should be good.