diff --git a/recipes/sam-2/meta.yaml b/recipes/sam-2/meta.yaml index 81c52a8a66040..344fa815cc99b 100644 --- a/recipes/sam-2/meta.yaml +++ b/recipes/sam-2/meta.yaml @@ -3,12 +3,6 @@ # They claim version 1.0 but they don't really release anything on pypi {% set version = "1.0.0." + git_hash_date + "." + git_hash %} -{% if cuda_compiler_version in (None, "None", True, False) %} -{% set cuda_major = 0 %} -{% else %} -{% set cuda_major = environ.get("cuda_compiler_version", "11.2").split(".")[0] | int %} -{% endif %} - package: # Their package name is "SAM 2" pip claims it is "SAM-2" # the lower case is thus "sam-2" @@ -23,9 +17,7 @@ source: - remove_torchvision_minimum_requirement.patch {% set build = 1 %} -{% if cuda_major != 0 %} -{% set build = build + 300 %} -{% endif %} +{% set build = build + 300 %} # [cuda_compiler_version != "None"] build: string: cpu_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] @@ -35,16 +27,13 @@ build: - export TORCH_CUDA_ARCH_LIST="5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX" # [cuda_compiler_version != "None"] - export CUDA_TOOLKIT_ROOT_DIR="${PREFIX}" # [cuda_compiler_version != "None"] - export FORCE_CUDA=1 # [cuda_compiler_version != "None"] - - {{ PYTHON }} -m pip install . -vv + - python -m pip install . -vv number: {{ build }} skip: true # [win] # A contributor can come and help build out 11.8 correctly - skip: true # [cuda_compiler_version == "11.8"] - {% if cuda_major != 0 %} - skip: true # [py<310] - {% else %} - noarch: python - {% endif %} + skip: true # [cuda_compiler_version == "11.8"] + skip: true # [py<310] + # noarch: python # [cuda_compiler_version == "None"] requirements: build: @@ -52,31 +41,25 @@ requirements: - {{ compiler('c') }} # [cuda_compiler_version != "None"] - {{ compiler('cxx') }} # [cuda_compiler_version != "None"] - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] - {% if cuda_major >= 12 %} - - libcublas-dev # [build_platform != target_platform] - - libcusolver-dev # [build_platform != target_platform] - - libcusparse-dev # [build_platform != target_platform] - - cuda-cudart-dev # [build_platform != target_platform] - {% endif %} + - libcublas-dev # [build_platform != target_platform and cuda_compiler_version != "None"] + - libcusolver-dev # [build_platform != target_platform and cuda_compiler_version != "None"] + - libcusparse-dev # [build_platform != target_platform and cuda_compiler_version != "None"] + - cuda-cudart-dev # [build_platform != target_platform and cuda_compiler_version != "None"] host: - - python # [cuda_compiler_version != "None"] - - python >=3.10 # [cuda_compiler_version == "None"] + - python - pip - setuptools # For now pin to pytorch 2.4.1 to avoid 2.3.X builds that # don't have the correct run exports - pytorch 2.4.1 - libtorch *=cuda* # [cuda_compiler_version != "None"] - {% if cuda_major >= 12 %} - - libcublas-dev - - libcusolver-dev - - libcusparse-dev - - cuda-cudart-dev - {% endif %} + - libcublas-dev # [cuda_compiler_version != "None"] + - libcusolver-dev # [cuda_compiler_version != "None"] + - libcusparse-dev # [cuda_compiler_version != "None"] + - cuda-cudart-dev # [cuda_compiler_version != "None"] - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] run: - - python # [cuda_compiler_version != "None"] - - python >=3.10 # [cuda_compiler_version == "None"] + - python - hydra-core - pytorch - torchvision >=0.18.1