Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Housekeeping] ImageSpec Source Root: Code Already in Image, No Extra Upload Required #6161

Open
2 tasks done
taieeuu opened this issue Jan 12, 2025 · 1 comment
Open
2 tasks done
Assignees
Labels
housekeeping Issues that help maintain flyte and keep it tech-debt free

Comments

@taieeuu
Copy link
Contributor

taieeuu commented Jan 12, 2025

Describe the issue

If using imagespec source_root parameter, the code will also upload the s3.

environment

from flytekit import task, workflow, ImageSpec

import os

image_spec = ImageSpec(packages=["tensorflow", "pandas"], registry="localhost:30000", source_root=os.path.abspath("./sample") )

@task(container_image=image_spec)
def t0():
	return "hello world"

@workflow
def wf():
	t0()

if __name__ == "__main__":
	wf()

execute

pyflyte --verbose run --remote sample/pingsutw_sample_imagespec.py wf

k3s
image

docker container

Project/OpenSource/flytekit  k3s_copy_issue ✔                                                                                                                                                                  7d0h
▶ docker images
REPOSITORY                                                TAG                                             IMAGE ID       CREATED             SIZE
localhost:30000/flytekit                                  OSHXNX_s8klKtGf6KwfJyA                          32dd628521c1   12 minutes ago      2.2GB
docker run -d -P --name flytekit-container-source-root localhost:30000/flytekit:OSHXNX_s8klKtGf6KwfJyA tail -f /dev/null
docker exec -it <container_id> bash
flytekit@7ecc945b7528:/root$ ls
pingsutw_sample_imagespec.py
flytekit@7ecc945b7528:/root$

What if we do not do this?

optimization

Related component(s)

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@taieeuu taieeuu added the housekeeping Issues that help maintain flyte and keep it tech-debt free label Jan 12, 2025
@taieeuu
Copy link
Contributor Author

taieeuu commented Jan 12, 2025

#take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Issues that help maintain flyte and keep it tech-debt free
Projects
None yet
Development

No branches or pull requests

1 participant