Skip to content

Commit

Permalink
Slim down pytorch-cuda
Browse files Browse the repository at this point in the history
It should only contain runtime dependencies that PyTorch+domain
libraries depend on, namely:
 - cudart
 - cublas
 - cusparse
 - cufft
 - curand
 - nvtx
 - nvrtc
 - nvjpeg (for TorchVision)

This removes dependencies on NVCC, build/debug tools, etc which are not
needed for running the pytorch

Test Plan:
  `conda create -n tmp -c nvidia -c malfet cuda-toolkit==11.7` and
observe that only relevant packages are installed

Fixes pytorch/pytorch#91334
  • Loading branch information
malfet committed Jan 26, 2023
1 parent c85d235 commit 942c854
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions conda/pytorch-cuda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,19 @@ build:
noarch: generic
requirements:
run:
- cuda={{ version }}
- cuda-libraries {{ cuda_constraints }}
- cuda-nvtx {{ cuda_constraints }}
run_constrained:
- cuda-cccl {{ cuda_constraints }}
- cuda-command-line-tools {{ cuda_constraints }}
- cuda-compiler {{ cuda_constraints }}
- cuda-cudart {{ cuda_constraints }}
- cuda-cudart-dev {{ cuda_constraints }}
- cuda-cuobjdump {{ cuda_constraints }}
- cuda-cupti {{ cuda_constraints }}
- cuda-cuxxfilt {{ cuda_constraints }}
- cuda-libraries {{ cuda_constraints }}
- cuda-nvcc {{ cuda_constraints }}
- cuda-nvprune {{ cuda_constraints }}
- cuda-nvrtc {{ cuda_constraints }}
- cuda-nvtx {{ cuda_constraints }}
- cuda-runtime {{ cuda_constraints }}
- cuda-toolkit {{ cuda_constraints }}
- cuda-tools {{ cuda_constraints }}
- libcufft {{ libcufft_constraints }}
- libcublas {{ libcublas_constraints }}
- libcusolver {{ libcusolver_constraints }}
- libcusparse {{ libcusparse_constraints }}
- libnpp {{ libnpp_constraints }}
- libnvjpeg {{ libnvjpeg_constraints }}
# None, pytorch should depend on pytorch-cuda
test:
commands:
- echo "pytorch-cuda metapackage is created."
Expand Down

0 comments on commit 942c854

Please sign in to comment.