-
Notifications
You must be signed in to change notification settings - Fork 59
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
ENH: Allow environments from docker build contexts #961
Conversation
99c27ba
to
4ee8519
Compare
4b0ea02
to
e053460
Compare
80d8044
to
47519fd
Compare
for more information, see https://pre-commit.ci
Co-authored-by: Fernando Pérez-García <[email protected]>
Co-authored-by: Fernando Pérez-García <[email protected]>
Co-authored-by: Fernando Pérez-García <[email protected]>
Co-authored-by: Fernando Pérez-García <[email protected]>
for more information, see https://pre-commit.ci
51fbc38
to
cd04241
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a couple of comments and re-triggered the failing CI job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for making those changed! Support for Docker is great to have.
Left a few questions, mostly around: Do we really need to add another argument python_exec
?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
0a73916
to
45b270e
Compare
45b270e
to
c1e5077
Compare
For awareness, I have changed how the section of code that creates an hi-ml/hi-ml-azure/src/health_azure/himl.py Lines 266 to 276 in 9c12e58
|
The chances of this are probably tiny, so I wouldn't worry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @samb-t!
Currently environments can only be constructed from conda files. This PR allows adds the optional argument
build_context
tosubmit_to_azure_if_needed
which can either be aDockerBuildContext
for SDK v1 or aBuildContext
for SDK v2.Build contexts are dockerfiles or folders containing a dockerfile that set up the docker environment.
For example to set up
uv
, the following dockerfile can be usedThe build context folder could contain a
pyproject.toml
file anduv sync
added to the dockerfile. Alternatively,uv sync
can be run at the start of a job, or justuv run
can be used to execute the script and install all depencies.The argument
python_launch_command
has been added tosubmit_to_azure_if_needed
. It defaults to"python"
and is used to form the command to be run in AzureML. Expected uses would be"torchrun"
or"uv run"
.Tests for new/modified functions:
load_and_hash_directory
create_run_configuration
create_script_run
submit_run_v2
submit_to_azure_if_needed