Hi, I've some problems pushing an image to the loc...
# ask-the-community
a
Hi, I've some problems pushing an image to the local sandbox. docker tag hello-world:latest localhost30000/newlatest docker push localhost30000/newlatest works. Running the workflow fails... ------
exporting to image:
------ Failed with Unknown Exception <class 'Exception'> Reason: failed to run command envd build --path /tmp/flyteuzg73u9w/control_plane_metadata/local_flytekit/bef74426ae24b7caeca89d338fe75c0b --platform linux/amd64 --output type=image,name=localhost30000/illust h5pynEaZXfQ3IwhB2_s3C1ghpg..,push=true with error b'time="2024-02-04T220135+01:00" level=fatal msg=exit app=envd error="failed to build the image: failed to build: failed to wait error group: failed to solve LLB: failed to solve: failed to do request: Head \\"http://localhost:30000/v2/illust_h5py/blobs/sha256:2c38fba545e2b43c8c2a44ccdfaf4fb2be4b63dbea04d2428db14d27a42705ec\\": dial tcp 127.0.0.130000 connect: connection refused" version=v0.3.45\n' Traceback: File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/clis/sdk_in_container/utils.py", line 139, in invoke return super().invoke(ctx) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/clis/sdk_in_container/run.py", line 530, in _run remote_entity = remote.register_script( File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/remote/remote.py", line 949, in register_script return self.register_workflow(entity, serialization_settings, version, default_launch_plan, options) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/remote/remote.py", line 782, in register_workflow ident = self._serialize_and_register(entity, serialization_settings, version, options, default_launch_plan) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/remote/remote.py", line 711, in _serialize_and_register _ = get_serializable(m, settings=serialization_settings, entity=entity, options=options) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/tools/translator.py", line 719, in get_serializable cp_entity = get_serializable_workflow(entity_mapping, settings, entity, options) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/tools/translator.py", line 248, in get_serializable_workflow serialized_nodes.append(get_serializable(entity_mapping, settings, n, options)) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/tools/translator.py", line 722, in get_serializable cp_entity = get_serializable_node(entity_mapping, settings, entity, options) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/tools/translator.py", line 453, in get_serializable_node task_spec = get_serializable(entity_mapping, settings, entity.flyte_entity, options=options) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/tools/translator.py", line 716, in get_serializable cp_entity = get_serializable_task(settings, entity) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/tools/translator.py", line 179, in get_serializable_task container = entity.get_container(settings) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/core/python_auto_container.py", line 183, in get_container return self._get_container(settings) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/core/python_auto_container.py", line 194, in _get_container image=get_registerable_container_image(self.container_image, settings.image_config), File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/core/python_auto_container.py", line 275, in get_registerable_container_image ImageBuildEngine.build(img) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/image_spec/image_spec.py", line 223, in build cls._REGISTRY[image_spec.builder].build_image(image_spec) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekitplugins/envd/image_builder.py", line 50, in build_image self.execute_command(build_command) File "/home/unix/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekitplugins/envd/image_builder.py", line 36, in execute_command raise Exception(f"failed to run command {command} with error {stderr}") failed to run command envd build --path /tmp/flyteuzg73u9w/control_plane_metadata/local_flytekit/bef74426ae24b7caeca89d338fe75c0b --platform linux/amd64 --output type=image,name=localhost30000/illust h5pynEaZXfQ3IwhB2_s3C1ghpg..,push=true with error b'time="2024-02-04T220135+01:00" level=fatal msg=exit app=envd error="failed to build the image: failed to build: failed to wait error group: failed to solve LLB: failed to solve: failed to do request: Head \\"http://localhost:30000/v2/illust_h5py/blobs/sha256:2c38fba545e2b43c8c2a44ccdfaf4fb2be4b63dbea04d2428db14d27a42705ec\\": dial tcp 127.0.0.130000 connect: connection refused" version=v0.3.45\n' my image_spec image_definition = ImageSpec( name="illust_h5py", # rename this to your docker image name # the base image that flytekit will use to build your image base_image="ghcr.io/flyteorg/flytekit:py3.11-1.10.2", packages=["flytekit>=1.6.0","h5py","plotly"], # packages to add to the base image registry="localhost:30000", # registry your image will be pushed to # the python version; optional if not different from the base image python_version="3.10" ) Any idea?
s
please run this command:
Copy code
envd context create --name flyte-sandbox --builder tcp --builder-address localhost:30003 --use
before you run the script.