Hello community :wave: I’m trying to run a workflo...
# ask-the-community
j
Hello community 👋 I’m trying to run a workflow with
ImageSpec
while using the local registry, is this possible? At the moment the following code is failing.
pyflyte run --remote workflow.py wf
workflow.py
Copy code
pandas_image_spec = ImageSpec(
  base_image="<http://ghcr.io/flyteorg/flytekit:py3.8-1.6.2|ghcr.io/flyteorg/flytekit:py3.8-1.6.2>",
  packages=["pandas", "numpy"],
  python_version="3.9",
  apt_packages=["git"],
  env={"Debug": "True"},
  registry = "localhost:30000/flyte-intro"
)

@task(container_image=pandas_image_spec)
def ... 

@workflow
def wf()
...
Failure:
Copy code
Failed with Unknown Exception <class 'Exception'> Reason: failed to run command envd build --path /var/folders/c4/2z5t6zdj7h78h29kp4hxg5q40000gp/T/flyte-aq9jgcop/sandbox/local_flytekit/a859d0330bbdf3e6341e9bf31303cf00 --platform linux/amd64 --output type=image,name=localhost:30000/flyte-intro/flytekit:H_w_f4H7tXZwqxvwThE8Mw..,push=true with error b'error: failed to do request: Head "<http://localhost:30000/v2/flyte-intro/flytekit/blobs/sha256:4e92f25a64ec360c0e7a8c571638cbee3718563966364ee745d715ff0902a51b>": dial tcp 127.0.0.1:30000: connect: connection refused\n'
b
Looks like a permission issue, does a local docker login and push work?
j
Yes, both docker login and push works fine
b
then I got no further experience, sorry /: Haven't used it myself yet, only read the docs a bit
h
can you run the following ?
ls -l /var/run/docker.sock
I guess the problem is mainly related to the docker read issue.
Copy code
srw-rw-rw- 1 root docker 0 Jul 19 01:54 /var/run/docker.sock
Make sure the permission looks like the above. if not, run following to update the permission.
Copy code
sudo chmod 664 /var/run/docker.sock
Then you should be fine, if not you may need to restart your docker daemon. In my case,
sudo systemctl restart docker
Hope this helps.
k
is buildkit deployment running in the sandbox?
we just merge this pr few days ago. not sure if you’re using latest sandbox.