buildkit icon indicating copy to clipboard operation
buildkit copied to clipboard

feat: support lfs

Open thxCode opened this issue 1 year ago • 2 comments

With the development of AI, more and more Git repositories use LFS to store model weights. The ADD command already supports pulling from Git URLs, https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#adding-files-from-a-url. This PR intends to support the ADD command to pull content managed by Git LFS.

thxCode avatar Aug 05 '24 03:08 thxCode

https://github.com/moby/buildkit/actions/runs/10241968157/job/28396722664?pr=5212#step:8:5671

=== FAIL: frontend/dockerfile TestIntegration/TestGitProvenanceAttestation/worker=containerd/frontend=builtin (0.86s)
    dockerfile_provenance_test.go:305: 
        	Error Trace:	/src/frontend/dockerfile/dockerfile_provenance_test.go:305
        	            				/src/util/testutil/integration/run.go:97
        	            				/src/util/testutil/integration/run.go:211
        	Error:      	Received unexpected error:
        	            	failed to read dockerfile: failed to install lfs for repo at /tmp/bktest_containerd3672960127/root/io.containerd.snapshotter.v1.overlayfs/snapshots/2/fs: git stderr:
        	            	git: 'lfs' is not a git command. See 'git --help'.

crazy-max avatar Aug 06 '24 09:08 crazy-max

https://github.com/moby/buildkit/actions/runs/10241968157/job/28396722664?pr=5212#step:8:5671

I will try to address your comments, thanks.

thxCode avatar Aug 06 '24 10:08 thxCode