I don’t think that’s the case as my setup also doesn’t have the lib folder.
Changing the location of the CUDA toolkit works fine, too:
ls /usr/local/cuda
NsightSystems-cli-2021.3.2  bin  compat  compute-sanitizer  extras  include  lib64  nvml  nvvm  share  src  targets

ln -s /usr/local/cuda ./mylocalcuda

CUDA_HOME=/workspace/src/mylocalcuda python setup.py develop

Output from the install log:
-- Caffe2: CUDA detected: 11.5
-- Caffe2: CUDA nvcc is: /workspace/src/mylocalcuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /workspace/src/mylocalcuda
...
--     CUDA version        : 11.5
...
--     CUDA root directory : /workspace/src/mylocalcuda
--     CUDA library        : /workspace/src/mylocalcuda/lib64/stubs/libcuda.so
--     cudart library      : /workspace/src/mylocalcuda/lib64/libcudart.so
--     cublas library      : /workspace/src/mylocalcuda/lib64/libcublas.so
--     cufft library       : /workspace/src/mylocalcuda/lib64/libcufft.so
--     curand library      : /workspace/src/mylocalcuda/lib64/libcurand.so
...
--     nvrtc               : /workspace/src/mylocalcuda/lib64/libnvrtc.so
--     CUDA include path   : /workspace/src/mylocalcuda/include
--     NVCC executable     : /workspace/src/mylocalcuda/bin/nvcc