-
Notifications
You must be signed in to change notification settings - Fork 6
Add --include_path option to include external folders in Docker build context #182
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
Changes from 10 commits
1dd07f5
8aeeaea
7563aa7
e9d4797
08ee6bd
9d2fa59
a621e79
4549483
88eb617
8954a94
faef3e7
507f9da
9ad30fe
d036d4b
5aef93e
9860407
5931775
aca5575
65e7f97
832a76f
a76a39e
e9ce063
ca6e7f5
c42301c
48bd4db
bccf904
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
mikewoodward94 marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| import atexit | ||
| import configparser | ||
| import logging | ||
| import os | ||
| import shutil | ||
| import subprocess | ||
| import sys | ||
|
|
||
|
|
@@ -76,7 +78,7 @@ | |
| if self.auth is None: | ||
| logger.debug(f'Found minio credentials in {self.auth.method}') | ||
| raise Exception( | ||
| f'minio credentials not found - either specify in ~/.aws/credentials or using environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)') | ||
|
|
||
| def check_dirty(self) -> bool: | ||
| """ | ||
|
|
@@ -247,6 +249,15 @@ | |
| """ | ||
| rebuild_docker = kwargs.get('rebuild_docker', False) | ||
| shared_memory = kwargs.get('shared_memory', '8gb') | ||
| include_path = kwargs.get('include_path', None) | ||
|
|
||
| if include_path: | ||
| folder_name = os.path.basename(os.path.abspath(include_path)) | ||
| included_folder_dest = os.path.join(self.project_path, folder_name) | ||
| shutil.rmtree(included_folder_dest, ignore_errors=True) | ||
|
||
| shutil.copytree(include_path, included_folder_dest) | ||
| logger.info(f'Copied {include_path} to {included_folder_dest}') | ||
| atexit.register(shutil.rmtree, included_folder_dest, ignore_errors=True) # remove folder at exit | ||
|
|
||
| logger.info(f'Starting experiment: {self.experiment_name}') | ||
|
|
||
|
|
||
mikewoodward94 marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| numpy | ||
| -f https://download.pytorch.org/whl/torch_stable.html | ||
| torch==2.0.1+cpu | ||
| mlflow | ||
| mlflow==2.10.0 | ||
| boto3 | ||
| requests==2.31.0 |
Uh oh!
There was an error while loading. Please reload this page.