cold-train-21872
07/28/2023, 4:26 PMImageSpec
on the hello world example. the hello world file:
from flytekit import ImageSpec, task, workflow
image = ImageSpec(
name="imagespec",
registry="localhost:30000",
packages=["smart-open[gcs]"],
apt_packages=["git"],
)
@task(container_image=image)
def say_hello() -> str:
return "hello world"
@workflow
def my_wf() -> str:
return say_hello()
I am running the demo sandbox and executed this
cd ~/projects/flytesnacks/examples/basics
flytectl demo start
envd context use --name flyte-sandbox
Using the right context I think:
❯ envd context ls
CONTEXT BUILDER BUILDER ADDR RUNNER RUNNER ADDR
default docker-container <docker-container://envd_buildkitd> docker
flyte-sandbox (current) tcp <tcp://localhost:30003> docker
Getting this error:
❯ pyflyte run --remote basics/hello_world.py my_wf
Image localhost:30000/imagespec:smnRYWZ9xTB4xFoEmprU_Q.. not found. Building...
Run command: envd build --path /tmp/flyte-7hnhtddt/sandbox/local_flytekit/9759c0608f0326822a33edc8a8603f11 --platform linux/amd64 --output type=image,name=localhost:30000/imagespec:smnRYWZ9xTB4xFoEmprU_Q..,push=true
Failed with Unknown Exception <class 'Exception'> Reason: failed to run command envd build --path /tmp/flyte-7hnhtddt/sandbox/local_flytekit/9759c0608f0326822a33edc8a8603f11 --platform linux/amd64 --output type=image,name=localhost:30000/imagespec:smnRYWZ9xTB4xFoEmprU_Q..,push=true with error b'error: timeout 5s: cannot connect to buildkitd\n'
failed to run command envd build --path /tmp/flyte-7hnhtddt/sandbox/local_flytekit/9759c0608f0326822a33edc8a8603f11 --platform linux/amd64 --output type=image,name=localhost:30000/imagespec:smnRYWZ9xTB4xFoEmprU_Q..,push=true with error b'error: timeout 5s: cannot connect to buildkitd\n'
glamorous-carpet-83516
07/30/2023, 4:32 AMglamorous-carpet-83516
07/30/2023, 4:33 AMkubectl get pods -n flyte
glamorous-carpet-83516
07/30/2023, 4:34 AMregistry="localhost:30000
should use 30003 herecold-train-21872
07/30/2023, 1:38 PM❯ kubectl get pods -n flyte
NAME READY STATUS RESTARTS AGE
flyte-sandbox-kubernetes-dashboard-6757db879c-8kbm2 1/1 Running 0 72s
flyte-sandbox-proxy-d95874857-zlc2k 1/1 Running 0 72s
flyte-sandbox-docker-registry-67b7b67664-89zlh 1/1 Running 0 72s
flyte-sandbox-minio-645c8ddf7c-mj6dt 1/1 Running 0 72s
flyte-sandbox-postgresql-0 1/1 Running 0 73s
flyte-sandbox-98749fb56-p5dc6 1/1 Running 0 72s
doesn't seem like the builtkit is running - how can I start thiscold-train-21872
07/31/2023, 10:32 PMglamorous-carpet-83516
07/31/2023, 10:36 PMfreezing-boots-56761
freezing-boots-56761
flytectl demo start --image=<http://ghcr.io/flyteorg/flyte-sandbox-bundled:sha-713f3f86a4d74d555e1a55b52065119df39117e3|ghcr.io/flyteorg/flyte-sandbox-bundled:sha-713f3f86a4d74d555e1a55b52065119df39117e3>
to use the latest nightly image
> kubectl get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
flyte flyte-sandbox-postgresql-0 1/1 Running 0 59s
flyte flyte-sandbox-proxy-d95874857-6l52x 1/1 Running 0 59s
kube-system local-path-provisioner-7b7dc8d6f5-sjlfr 1/1 Running 0 59s
flyte flyte-sandbox-docker-registry-5876748b9c-tg482 1/1 Running 0 59s
kube-system coredns-b96499967-rv99h 1/1 Running 0 59s
flyte flyte-sandbox-kubernetes-dashboard-6757db879c-smvr6 1/1 Running 0 59s
flyte flyte-sandbox-minio-645c8ddf7c-2tv64 1/1 Running 0 59s
flyte flyte-sandbox-buildkit-7d7d55dbb-mgpk6 1/1 Running 0 59s
kube-system metrics-server-668d979685-nv7r9 1/1 Running 0 59s
flyte flyte-sandbox-98749fb56-xxq9n 1/1 Running 1 (37s ago) 59s
freezing-boots-56761
flyteorg/flyte
commit after the buildkit commit went infreezing-boots-56761
flytectl demo start --image=<http://ghcr.io/flyteorg/flyte-sandbox-bundled:sha-<LONG_COMMIT|ghcr.io/flyteorg/flyte-sandbox-bundled:sha-<LONG_COMMIT>>
cold-train-21872
08/01/2023, 1:43 AM