Skip to content

feature: deference symbolic link when create tar file of source and dependencies #2338

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

Merged
merged 9 commits into from
Aug 18, 2021
2 changes: 1 addition & 1 deletion src/sagemaker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def create_tar_file(source_files, target=None):
else:
_, filename = tempfile.mkstemp()

with tarfile.open(filename, mode="w:gz") as t:
with tarfile.open(filename, mode="w:gz", dereference=True) as t:
for sf in source_files:
# Add all files from the directory into the root of the directory structure of the tar
t.add(sf, arcname=os.path.basename(sf))
Expand Down