`docker_image` target is very strange. Resolves `p...
# general
g
docker_image
target is very strange. Resolves
pex
and
file
dependencies, but doesn't generic
targets
. I have a bunch of `file`s in a
target
and use it everywhere, but
docker_image
somehow fails to resolve them. It works if I repackage separate `file`s to
files
, but it seems unnecessary
b
Are you looking for help? If so, can you share the definition of your
docker_image
target and the
target
target? 😄
g
Looks somewhat like this:
Copy code
docker_image(
    name="docker_image",
    repository="service",
    dependencies=[
        "//:model"
    ],
)
target(
    name="model",
    dependencies=[
        ":model.safetensors",
        ":added_tokens.json",
        ":config.json",
        ":special_tokens_map.json",
        ":spm.model",
        ":tokenizer.json",
        ":tokenizer_config.json",
        ":training_args.bin",
    ],
)
b
ah, and the problem is that
Dockerfile
commands like
COPY model.safetensors .
don't work with that, but do work with a
files(name="model", sources=[...])
target?
g
Yeah, I can't use
files
, because it doesn't support
http_source