Hi, so I have a Dockerfile that uses nvidia/cuda a...
# general
r
Hi, so I have a Dockerfile that uses nvidia/cuda as base. I then copy my pants build which includes torch. Torch also installs subdependencies like nvidia_cublas_cu12, ... Is there a way to ignore these dependencies? These are already available in the base docker. I tried to ignore them in the pex_binary but that does not work
Manually removing the requires_dists from torch in the lockfile works but how can this be done in a automated manner?
g
IIRC you can use
!
in in
dependencies=[...]
to exclude dependencies.
p
This is what I did:
Copy code
pex_binary(
        name=name,
        dependencies=dependencies,
        extra_build_args=[
            "--no-transitive",
        ],
        ignore_errors=True,
        include_sources=False,
        include_tools=True,
        layout="packed",
    )
And then I do a venv compile later.