Hi, everyone. I'm evaluating Flyte for a project a...
# ask-the-community
d
Hi, everyone. I'm evaluating Flyte for a project and most of the tasks we'd need are already containerized. I'm using the local sandbox/demo cluster and a task like this:
Copy code
crosscheck_fingerprints_task = ContainerTask(
    name="crosscheck-fingerprints",
    input_data_dir="/var/inputs",
    output_data_dir="/var/outputs",
    inputs=kwtypes(haplotype_map=FlyteFile, vcf1=FlyteFile, vcf2=FlyteFile),
    outputs=kwtypes(crosscheck=FlyteFile),
    image="broadinstitute/picard:latest",
    command=[
        "/bin/sh",
        "-c",
        " ".join(
            [
                "java",
                '"-Xmx2g"',
                "-jar /usr/picard/picard.jar",
                "CrosscheckFingerprints",
                "--HAPLOTYPE_MAP /var/inputs/haplotype_map",
                "--CALCULATE_TUMOR_AWARE_RESULTS false",
                "--INPUT /var/inputs/vcf1.vcf",
                "--SECOND_INPUT /var/inputs/vcf2.vcf",
                "--CROSSCHECK_BY FILE",
                "--CROSSCHECK_MODE CHECK_ALL_OTHERS",
                "--OUTPUT /var/outputs/crosscheck",
            ]
        ),
    ],
)
You'll notice two things not observed in the examples (The note "Raw containers cannot be run locally at the moment" seems to be incorrect, thankfully): 1. I have to run
/bin/sh -c java ...
instead of just
java
, otherwise Flyte says it can't find
java
even though it's on the PATH. 2. The actual
java ...
command needs to be transmitted all on one line, probably as a result of (1). Is there a better way of calling
ContainerTask
?
I also tried using
args
in addition to
command
but as far as I can tell looking at the pod in the local k8s dashboard, that doesn't actually get applied?
s
have you tried
arguments
? @Kevin Su is it possible to run raw containers locally now? has the functionality been added?
k
not support it yet
d
Hmm maybe it works locally because I made the task
@dynamic
? I'm testing my setup on GKE soon, so maybe that will reveal other functionality.