Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Convert requirement to bytes if needed (#622)
Browse files Browse the repository at this point in the history
close #620
  • Loading branch information
aguschin authored Mar 1, 2023
1 parent c448416 commit daf022e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mlem/contrib/docker/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ def write_local_sources(self, requirements: Requirements):
logger.debug('Putting model source "%s" to distribution...', path)
full_path = posixpath.join(self.path, path)
self.fs.makedirs(posixpath.dirname(full_path), exist_ok=True)
if isinstance(src, str): # type: ignore
src = src.encode() # type: ignore
with self.fs.open(full_path, "wb") as f:
f.write(src)

Expand Down

0 comments on commit daf022e

Please sign in to comment.