floydhub / floyd-cli

Command line tool for FloydHub - the fastest way to build, train, and deploy deep learning models
https://floydhub.com
Apache License 2.0
156 stars 34 forks source link

floyd data upload does not work with symlinks on Mac #231

Open glancashire opened 4 years ago

glancashire commented 4 years ago

I have several collections of images which I consolidate with symlinks.

When I execute floyd data upload the symlinks and not the files are uploaded. So an invalid 0kb file instead of the image.

Is there a way to circumvent this?

Kind Regards Graham

ReDeiPirati commented 4 years ago

Hi @glancashire,

Is there a way to circumvent this?

Yes, by default the TarFile object doesn't follow the symlink but provides only the link file. You can change this by editing this line in this way:

with tarfile.open(self.filename, "w:gz", dereference=True) as tar:

Let me know if this works.

glancashire commented 4 years ago

Hi @kingofthepirates

it seems to work, once I removed any broken symlinks, which cause it to crash/abort.

Kind regards Graham