My code: ```from flytekit import task, workflow, I...
# ask-the-community
r
My code:
Copy code
from flytekit import task, workflow, ImageSpec

image_spec = ImageSpec(packages=["numpy", "tensorflow"], base_image="<http://container-image-registry.corp.linkedin.com:8083/lps-image/linkedin/mldev-workspace/mldev-base-image:0.0.16|container-image-registry.corp.linkedin.com:8083/lps-image/linkedin/mldev-workspace/mldev-base-image:0.0.16>", pip_index="<https://lerna.tools.corp.linkedin.com/pypi/simple/>", registry="localhost:30000")

@task(container_image=image_spec)
def t1() -> str:
    import numpy as np
    print("task 1")
    print(np.array([1,2,3]))

    import tensorflow as tf
    print("task 2")
    print(tf.constant(8))
    return("blah1")

@workflow
def wf():
    t1()
Then I run:
Copy code
pyflyte run --remote example.py wf
Error:
Copy code
Failed with Unknown Exception <class 'Exception'> Reason: failed to build the imageSpec at /var/folders/9v/3dl8rh2x0nx9ccbv3xkd708h002_42/T/flyte-mktmp10q/sandbox/local_flytekit/4e7f726c4f5a035e23addb662302e8e1/build.envd with error b'error: failed to do request: Head "<http://localhost:30000/v2/flytekit/blobs/sha256:a0e77e7122fc5edfccf28327cc28f2c15e34ee2ec76fa0c7486a6679c014a134>": dial tcp 127.0.0.1:30000: connect: connection refused\n'
s
Hi @Richard Li! The imagespec process is a little different for local registry. Please refer to this PR: https://github.com/flyteorg/flytesnacks/pull/1001/files.
y
wait why do the instructions have to change?
isn’t the registry installed as part of demo just like any other registry?
s
@Kevin Su
p
Are these instructions still up to date? I followed the instructions in the PR and after running pyflyte build --remote I am getting: failed to run command envd build --path /tmp/flyte-i4701qmr/sandbox/local_flytekit/e47fd6b4b779d1e8d7f3f8f2946262d8 --platform linux/amd64 --output type=image,name=172.17.0.2:30000/flytekit:S_GiRuJwaz67ifrNCrLc_g..,push=true with error b'error: failed to do request: Head "https://172.17.0.2:30000/v2/flytekit/blobs/sha256:cdda001b82c3280acecbb33454c0644720833b6937af70993bf3eaaf7e3bc6af": http: server gave HTTP response to HTTPS client\n'
170 Views