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
At the moment we install the conda environment in the Docker container to primarily get the environment file with all the resolved dependencies. This can also be achieve with a simple dry-run command:
def get_detailed_environment(environment_input_file, environment_output_file):
output_start = subprocess.check_output(
["conda", "env", "create", "-n", "testenv", "-f", environment_input_file, "--dry-run", "--json"],
shell=False,
universal_newlines=True
)
output_start_dict = json.loads(output_start)
output_dict = output_start_dict.copy()
if output_dict["name"] is None:
del output_dict["name"]
output_dict["dependencies"] = list(sorted([
dep.split("::")[-1].replace("==", "=")
for dep in output_dict["dependencies"]
]))
with open(environment_output_file, "w") as f:
f.writelines(yaml.dump(output_dict))
output_extended = subprocess.check_output(
["conda", "env", "create", "-n", "testenv", "-f", environment_output_file, "--dry-run", "--json"],
shell=False,
universal_newlines=True
)
output_extended_dict = json.loads(output_extended)
return output_extended_dict == output_start_dict
So maybe it is possible to first create the conda environment files and then install them in the docker containers.
The text was updated successfully, but these errors were encountered:
At the moment we install the conda environment in the Docker container to primarily get the environment file with all the resolved dependencies. This can also be achieve with a simple
dry-run
command:So maybe it is possible to first create the conda environment files and then install them in the docker containers.
The text was updated successfully, but these errors were encountered: