<#6518 [BUG] ImageSpec.is_container returns True d...
# flyte-github
c
#6518 [BUG] ImageSpec.is_container returns True during fast registration Issue created by francescorubbo ### Flyte & Flytekit version flytekit==1.16.1 ### Describe the bug The
ImageSpec
method
is_container()
returns True during fast registration with
pyflyte run --remote
or
pyflyte register
. ### Expected behavior The
ImageSpec
method
is_container()
should return True only during execution in the corresponding container or during local execution. ### Additional context to reproduce 1. Implement the following workflow
Copy code
from flytekit import ImageSpec, workflow, task

image_spec = ImageSpec(
    packages=["pandas"],
    registry=...
)

if image_spec.is_container():
    import pandas as pd

@task(container_image=image_spec)
def task1():
    df = pd.DataFrame()

@workflow
def wf1():
    task1()
1. Create and activate a virtual environment with only
flytekit==1.16.1
2.
pyflyte run --remote
or
pyflyte register
will try to execute the pandas import locally. ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte