diff --git a/conda-store-server/conda_store_server/action/generate_conda_docker.py b/conda-store-server/conda_store_server/action/generate_conda_docker.py index 42d60147f..57177c699 100644 --- a/conda-store-server/conda_store_server/action/generate_conda_docker.py +++ b/conda-store-server/conda_store_server/action/generate_conda_docker.py @@ -1,5 +1,4 @@ import pathlib -import sys from conda_store_server import action @@ -13,35 +12,34 @@ def action_generate_conda_docker( output_image_name: str, output_image_tag: str, ): - if sys.platform != "linux": - raise RuntimeError( - "Generating Docker images is currently only supported on Linux" - ) + # Upstream issue in conda-docker, see + # https://github.com/conda-incubator/conda-store/issues/666 + raise RuntimeError("Generating Docker images is currently not supported") - # Import is inside the function because conda_docker is only available on - # Linux - from conda_docker.conda import ( - build_docker_environment_image, - conda_info, - fetch_precs, - find_user_conda, - precs_from_environment_prefix, - ) + # # Import is inside the function because conda_docker is only available on + # # Linux + # from conda_docker.conda import ( + # build_docker_environment_image, + # conda_info, + # fetch_precs, + # find_user_conda, + # precs_from_environment_prefix, + # ) - user_conda = find_user_conda() - info = conda_info(user_conda) - download_dir = info["pkgs_dirs"][0] - precs = precs_from_environment_prefix(str(conda_prefix), download_dir, user_conda) - records = fetch_precs(download_dir, precs) - base_image = container_registry.pull_image(default_docker_image) - image = build_docker_environment_image( - base_image=base_image, - output_image=f"{output_image_name}:{output_image_tag}", - records=records, - default_prefix=info["env_vars"]["CONDA_ROOT"], - download_dir=download_dir, - user_conda=user_conda, - channels_remap=info.get("channels_remap", []), - layering_strategy="single", - ) - return image + # user_conda = find_user_conda() + # info = conda_info(user_conda) + # download_dir = info["pkgs_dirs"][0] + # precs = precs_from_environment_prefix(str(conda_prefix), download_dir, user_conda) + # records = fetch_precs(download_dir, precs) + # base_image = container_registry.pull_image(default_docker_image) + # image = build_docker_environment_image( + # base_image=base_image, + # output_image=f"{output_image_name}:{output_image_tag}", + # records=records, + # default_prefix=info["env_vars"]["CONDA_ROOT"], + # download_dir=download_dir, + # user_conda=user_conda, + # channels_remap=info.get("channels_remap", []), + # layering_strategy="single", + # ) + # return image