build error

build failed with exit code: 1, message: None

Build logs:

--> FROM docker.io/library/python:3.8.9@sha256:49d05fff9cb3b185b15ffd92d8e6bd61c20aa916133dca2e3dbe0215270faf53
DONE 0.0s

--> RUN apt-get update && apt-get install -y         ffmpeg         libsm6         libxext6         cmake         libgl1-mesa-glx
CACHED

--> RUN pip install pip==22.0.2
CACHED

--> WORKDIR /home/user/app
CACHED

--> RUN useradd -m -u 1000 user
CACHED

--> RUN mkdir app
CACHED

--> COPY packages.txt /root/packages.txt
CACHED

--> RUN apt-get update && xargs -r -a /root/packages.txt apt-get install -y
CACHED

--> WORKDIR /home/user
CACHED

--> RUN git lfs install
CACHED

--> RUN apt-get update && apt-get install -y git-lfs
CACHED

--> RUN pip install         datasets         huggingface-hub
CACHED

--> COPY requirements.txt /home/user/app/requirements.txt
DONE 0.0s

--> RUN pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting torch
  Downloading torch-1.12.1-cp38-cp38-manylinux1_x86_64.whl (776.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 776.3/776.3 MB 2.8 MB/s eta 0:00:00
Collecting Pillow
  Downloading Pillow-9.2.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 119.6 MB/s eta 0:00:00
Collecting torchvision
  Downloading torchvision-0.13.1-cp38-cp38-manylinux1_x86_64.whl (19.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.1/19.1 MB 98.9 MB/s eta 0:00:00
Collecting timm
  Downloading timm-0.6.11-py3-none-any.whl (548 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 548.7/548.7 KB 72.3 MB/s eta 0:00:00
Collecting cupy
  Downloading cupy-11.2.0.tar.gz (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 114.1 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: typing-extensions in /home/user/.local/lib/python3.8/site-packages (from torch->-r requirements.txt (line 1)) (4.4.0)
Requirement already satisfied: numpy in /home/user/.local/lib/python3.8/site-packages (from torchvision->-r requirements.txt (line 3)) (1.23.4)
Requirement already satisfied: requests in /home/user/.local/lib/python3.8/site-packages (from torchvision->-r requirements.txt (line 3)) (2.28.1)
Requirement already satisfied: huggingface-hub in /home/user/.local/lib/python3.8/site-packages (from timm->-r requirements.txt (line 4)) (0.10.1)
Requirement already satisfied: pyyaml in /home/user/.local/lib/python3.8/site-packages (from timm->-r requirements.txt (line 4)) (6.0)
Collecting fastrlock>=0.5
  Using cached fastrlock-0.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (49 kB)
Requirement already satisfied: filelock in /home/user/.local/lib/python3.8/site-packages (from huggingface-hub->timm->-r requirements.txt (line 4)) (3.8.0)
Requirement already satisfied: tqdm in /home/user/.local/lib/python3.8/site-packages (from huggingface-hub->timm->-r requirements.txt (line 4)) (4.64.1)
Requirement already satisfied: packaging>=20.9 in /home/user/.local/lib/python3.8/site-packages (from huggingface-hub->timm->-r requirements.txt (line 4)) (21.3)
Requirement already satisfied: idna<4,>=2.5 in /home/user/.local/lib/python3.8/site-packages (from requests->torchvision->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/user/.local/lib/python3.8/site-packages (from requests->torchvision->-r requirements.txt (line 3)) (2022.9.24)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/user/.local/lib/python3.8/site-packages (from requests->torchvision->-r requirements.txt (line 3)) (1.26.12)
Requirement already satisfied: charset-normalizer<3,>=2 in /home/user/.local/lib/python3.8/site-packages (from requests->torchvision->-r requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /home/user/.local/lib/python3.8/site-packages (from packaging>=20.9->huggingface-hub->timm->-r requirements.txt (line 4)) (3.0.9)
Building wheels for collected packages: cupy
  Building wheel for cupy (setup.py): started
  Building wheel for cupy (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      
      -------- Configuring Module: cuda --------
      /tmp/tmpqtvz360m/a.cpp:1:10: fatal error: cublas_v2.h: No such file or directory
       #include <cublas_v2.h>
                ^~~~~~~~~~~~~
      compilation terminated.
      command 'gcc' failed with exit status 1
      /tmp/tmp_ufa7tug/a.cpp:2:18: fatal error: cuda_runtime_api.h: No such file or directory
               #include <cuda_runtime_api.h>
                        ^~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      **************************************************
      *** WARNING: Cannot check compute capability
      command 'gcc' failed with exit status 1
      **************************************************
      
      ************************************************************
      * CuPy Configuration Summary                               *
      ************************************************************
      
      Build Environment:
        Include directories: ['/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/cupy/_core/include/cupy/cub', '/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/cupy/_core/include']
        Library directories: []
        nvcc command       : (not found)
        hipcc command      : (not found)
      
      Environment Variables:
        CFLAGS          : (none)
        LDFLAGS         : (none)
        LIBRARY_PATH    : (none)
        CUDA_PATH       : (none)
        NVTOOLSEXT_PATH : (none)
        NVCC            : (none)
        HIPCC           : (none)
        ROCM_HOME       : (none)
      
      Modules:
        cuda      : No
          -> Include files not found: ['cublas_v2.h', 'cuda.h', 'cuda_profiler_api.h', 'cuda_runtime.h', 'cufft.h', 'curand.h', 'cusparse.h', 'nvrtc.h']
          -> Check your CFLAGS environment variable.
      
      ERROR: CUDA could not be found on your system.
      
      HINT: You are trying to build CuPy from source, which is NOT recommended for general use.
            Please consider using binary packages instead.
      
      Please refer to the Installation Guide for details:
      https://docs.cupy.dev/en/stable/install.html
      
      ************************************************************
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/setup.py", line 86, in <module>
          ext_modules = cupy_setup_build.get_ext_modules(True, ctx)
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/install/cupy_builder/cupy_setup_build.py", line 491, in get_ext_modules
          extensions = make_extensions(ctx, compiler, use_cython)
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/install/cupy_builder/cupy_setup_build.py", line 306, in make_extensions
          raise Exception('Your CUDA environment is invalid. '
      Exception: Your CUDA environment is invalid. Please check above error log.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cupy
  Running setup.py clean for cupy
  error: subprocess-exited-with-error
  
  × python setup.py clean did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      
      -------- Configuring Module: cuda --------
      /tmp/tmppnwxc3t5/a.cpp:1:10: fatal error: cublas_v2.h: No such file or directory
       #include <cublas_v2.h>
                ^~~~~~~~~~~~~
      compilation terminated.
      command 'gcc' failed with exit status 1
      /tmp/tmpnmy7aair/a.cpp:2:18: fatal error: cuda_runtime_api.h: No such file or directory
               #include <cuda_runtime_api.h>
                        ^~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      **************************************************
      *** WARNING: Cannot check compute capability
      command 'gcc' failed with exit status 1
      **************************************************
      
      ************************************************************
      * CuPy Configuration Summary                               *
      ************************************************************
      
      Build Environment:
        Include directories: ['/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/cupy/_core/include/cupy/cub', '/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/cupy/_core/include']
        Library directories: []
        nvcc command       : (not found)
        hipcc command      : (not found)
      
      Environment Variables:
        CFLAGS          : (none)
        LDFLAGS         : (none)
        LIBRARY_PATH    : (none)
        CUDA_PATH       : (none)
        NVTOOLSEXT_PATH : (none)
        NVCC            : (none)
        HIPCC           : (none)
        ROCM_HOME       : (none)
      
      Modules:
        cuda      : No
          -> Include files not found: ['cublas_v2.h', 'cuda.h', 'cuda_profiler_api.h', 'cuda_runtime.h', 'cufft.h', 'curand.h', 'cusparse.h', 'nvrtc.h']
          -> Check your CFLAGS environment variable.
      
      ERROR: CUDA could not be found on your system.
      
      HINT: You are trying to build CuPy from source, which is NOT recommended for general use.
            Please consider using binary packages instead.
      
      Please refer to the Installation Guide for details:
      https://docs.cupy.dev/en/stable/install.html
      
      ************************************************************
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/setup.py", line 86, in <module>
          ext_modules = cupy_setup_build.get_ext_modules(True, ctx)
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/install/cupy_builder/cupy_setup_build.py", line 491, in get_ext_modules
          extensions = make_extensions(ctx, compiler, use_cython)
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/install/cupy_builder/cupy_setup_build.py", line 306, in make_extensions
          raise Exception('Your CUDA environment is invalid. '
      Exception: Your CUDA environment is invalid. Please check above error log.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed cleaning build dir for cupy
Failed to build cupy
Installing collected packages: fastrlock, torch, Pillow, cupy, torchvision, timm
  Running setup.py install for cupy: started
  Running setup.py install for cupy: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Running setup.py install for cupy did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      
      -------- Configuring Module: cuda --------
      /tmp/tmpljw00ced/a.cpp:1:10: fatal error: cublas_v2.h: No such file or directory
       #include <cublas_v2.h>
                ^~~~~~~~~~~~~
      compilation terminated.
      command 'gcc' failed with exit status 1
      /tmp/tmp60rofchf/a.cpp:2:18: fatal error: cuda_runtime_api.h: No such file or directory
               #include <cuda_runtime_api.h>
                        ^~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      **************************************************
      *** WARNING: Cannot check compute capability
      command 'gcc' failed with exit status 1
      **************************************************
      
      ************************************************************
      * CuPy Configuration Summary                               *
      ************************************************************
      
      Build Environment:
        Include directories: ['/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/cupy/_core/include/cupy/cub', '/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/cupy/_core/include']
        Library directories: []
        nvcc command       : (not found)
        hipcc command      : (not found)
      
      Environment Variables:
        CFLAGS          : (none)
        LDFLAGS         : (none)
        LIBRARY_PATH    : (none)
        CUDA_PATH       : (none)
        NVTOOLSEXT_PATH : (none)
        NVCC            : (none)
        HIPCC           : (none)
        ROCM_HOME       : (none)
      
      Modules:
        cuda      : No
          -> Include files not found: ['cublas_v2.h', 'cuda.h', 'cuda_profiler_api.h', 'cuda_runtime.h', 'cufft.h', 'curand.h', 'cusparse.h', 'nvrtc.h']
          -> Check your CFLAGS environment variable.
      
      ERROR: CUDA could not be found on your system.
      
      HINT: You are trying to build CuPy from source, which is NOT recommended for general use.
            Please consider using binary packages instead.
      
      Please refer to the Installation Guide for details:
      https://docs.cupy.dev/en/stable/install.html
      
      ************************************************************
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/setup.py", line 86, in <module>
          ext_modules = cupy_setup_build.get_ext_modules(True, ctx)
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/install/cupy_builder/cupy_setup_build.py", line 491, in get_ext_modules
          extensions = make_extensions(ctx, compiler, use_cython)
        File "/tmp/pip-install-5zy6bkyj/cupy_c8fbc7b67fd4441aaac2d362cad5ccc5/install/cupy_builder/cupy_setup_build.py", line 306, in make_extensions
          raise Exception('Your CUDA environment is invalid. '
      Exception: Your CUDA environment is invalid. Please check above error log.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> cupy

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: You are using pip version 22.0.2; however, version 22.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

--> ERROR: process "/bin/sh -c pip install -r requirements.txt" did not complete successfully: exit code: 1