-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Hi, coming from poetry, I am trying out uv due to poetry's super slow resolutions and bulk.
Our workflow is as follows,
- Devs develop a project on their Macs with dependency
sentence-transformers
which pulls in torch as well. - Macs do not have GPU, so by default, we'd like to run all development and even deployment on CPU only
- For the final product env, where GPUs are available, we would like to have an extras flag in the project, let's say 'cuda' which pulls in GPU dependencies.
In short, we'd like to use uv to create a project in which the project source code remains the same, it is developed on Mac and only pulls in CPU dependencies by default. But for the target deployment environment where GPUs are available, we should be able to deploy the same project with an extra flag that pulls in the torch's GPU dependencies as well.
In poetry, we were following something like this, any suggestions on how to do this uv/ rye as we are very new with this?
Also referencing, pytorch/pytorch#136275
Dev Env Details:
uv == latest, 0.4.18
python >= 3.8
platform: mac, sequoia, cpu-only env
Prod Env Details:
uv == latest, 0.4.18
python >= 3.8
platform: linux, gpu env