dstackai / dstack

dstack is an open-source alternative to Kubernetes, designed to simplify development, training, and deployment of AI across any cloud or on-prem. It supports NVIDIA, AMD, and TPU.
https://dstack.ai/docs
Mozilla Public License 2.0
1.41k stars 140 forks source link

[Bug]: Some locally committed files are empty in runs #1679

Open jvstme opened 1 month ago

jvstme commented 1 month ago

Steps to reproduce

Clone a git repo and commit any binary file or a large (e.g. 1GB) text file. Do not push to remote.

> git clone https://github.com/dstackai/gpuhunt.git
Cloning into 'gpuhunt'...
remote: Enumerating objects: 1264, done.
remote: Counting objects: 100% (623/623), done.
remote: Compressing objects: 100% (294/294), done.
remote: Total 1264 (delta 417), reused 458 (delta 321), pack-reused 641 (from 1)
Receiving objects: 100% (1264/1264), 272.24 KiB | 1010.00 KiB/s, done.
Resolving deltas: 100% (686/686), done.

> cd gpuhunt/

> dd if=/dev/zero of=test-file bs=65536 count=1
1+0 records in
1+0 records out
65536 bytes (66 kB, 64 KiB) copied, 0.000250103 s, 262 MB/s

> git add test-file

> git commit -m test

Run a dstack configuration in this repo.

> printf "type: dev-environment\nide: vscode\nname: test-run" > .dstack.yml
> dstack init
OK
> dstack apply -y

Wait until the run is running.

Actual behaviour

The file is empty in the run.

> ssh test-run ls -lh /workflow/test-file
-rw-r--r-- 1 root root 0 Sep 10 08:09 /workflow/test-file

Expected behaviour

The file is not empty.

> ssh test-run ls -lh /workflow/test-file
-rw-r--r-- 1 root root 64K Sep 10 08:09 /workflow/test-file

Additional information

Here git diff only returns file names for binary or large files, not the actual diff.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity.