You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We forgot about the env keyword argument in #31, oopsie.
This keyword allows users to inject environment variables in the kernel launch. We used it for LD_LIBRARY_PATH, but we don't need that anymore because we activate the environment fully.
Instead, I suggest we revamp this option and mix it with a new keyword argument `pre_kernel_launch or something. It should accept either a path to a file or a multiline content str.
Logic would be like:
deffn(..., env={"my_var": "my_value"}, pre_kernel_launch="my_script.sh"):
...
contents=""forkey, valueinenv.items():
contents+=f'export {key}="{value}"\n'withopen(pre_kernel_launch_script) asf:
contents+="\n"contents+=f.read()
...
withopen(sys.executable, "w") asf:
f.write(
f""" #!/bin/bash{contents} # this is the new change! source {prefix}/etc/profile.d/conda.sh conda activate unset PYTHONPATH mv /usr/bin/lsb_release /usr/bin/lsb_release.renamed_by_condacolab.bak exec {bin_path}/python $@ """
The text was updated successfully, but these errors were encountered:
We forgot about the
env
keyword argument in #31, oopsie.This keyword allows users to inject environment variables in the kernel launch. We used it for
LD_LIBRARY_PATH
, but we don't need that anymore because we activate the environment fully.Instead, I suggest we revamp this option and mix it with a new keyword argument `pre_kernel_launch or something. It should accept either a path to a file or a multiline content str.
Logic would be like:
The text was updated successfully, but these errors were encountered: