Skip to content
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

Support {python} placeholder for cmdspec #226

Closed
mih opened this issue Oct 9, 2023 · 0 comments · Fixed by #227
Closed

Support {python} placeholder for cmdspec #226

mih opened this issue Oct 9, 2023 · 0 comments · Fixed by #227

Comments

@mih
Copy link
Member

mih commented Oct 9, 2023

The way we handle the execution of the docker adaptor is suboptimal (see #224).

Even if we arrive at a more portable python exectuable, we still won't capture all variability across system. We need to get the correct python on the system that may rerun the record. It needs to be the one that has the adaptor installed.

it makes sense to me to start supporting a {python} placeholder that is replaced with sys.exectuable on execute. We would then know that this executable is the one that runs the datalad code that triggers the execution.

mih added a commit to mih/datalad-container that referenced this issue Oct 9, 2023
This placeholder is expanded on *execution* of a container, rather than
on configuration/addition. This helps use the same Python installation
that is also executing the datalad-container code.

Previously, the docker-support code would expand and then hardcode
`sys.executable` on configuring a container. This led to non-portable
configuration (e.g., hardcoded `python.exe` on windows), and would fail
to pick up the correct python installation in any case where the
`python` entrypoint would not point to the correct one.

Closes datalad#226
Closes datalad#224
mih added a commit to mih/datalad-container that referenced this issue Oct 9, 2023
This placeholder is expanded on *execution* of a container, rather than
on configuration/addition. This helps use the same Python installation
that is also executing the datalad-container code.

Previously, the docker-support code would expand and then hardcode
`sys.executable` on configuring a container. This led to non-portable
configuration (e.g., hardcoded `python.exe` on windows), and would fail
to pick up the correct python installation in any case where the
`python` entrypoint would not point to the correct one.

Closes datalad#226
Closes datalad#224
mih added a commit to mih/datalad-container that referenced this issue Oct 9, 2023
This placeholder is expanded on *execution* of a container, rather than
on configuration/addition. This helps use the same Python installation
that is also executing the datalad-container code.

Previously, the docker-support code would expand and then hardcode
`sys.executable` on configuring a container. This led to non-portable
configuration (e.g., hardcoded `python.exe` on windows), and would fail
to pick up the correct python installation in any case where the
`python` entrypoint would not point to the correct one.

Closes datalad#226
Closes datalad#224
@mih mih closed this as completed in #227 Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant