Skip to content

Add an option to allow keeping the conda command #455

@sgaist

Description

@sgaist

Describe the Enhancement

Currently, the conda layer is temporary and dropped as part of the build once the environment has been created. This change would allow to optionally keep the layer and thus the command available.

In addition to keeping the layer itself, adjustment to the conda configuration are required in order to make it user friendly.

The original feature request was opened on the miniconda buildpack but this one is better suited for the task.

Possible Solution

Add an environment variable that would allow to change the default layer dropping behaviour. Something like BP_KEEP_CONDA. It would be used make the layer also available at launch time.

In addition to that:

  • The conda configuration needs to be altered to allow properly finding the environment and also to show a nice prompt since external environments get the full path in it.
  • The history must kept (but can be truncated) otherwise the conda command won't see the environment even if it's in the folders listed to contain environments
  • An exec.d script should be added so that the user gets its bash environment ready for conda use.

Motivation

As part of the Renku project, we would like to create reusable images that allow people to also continue working in them. It's already possible when using pip as it is part of Python itself however, the conda layer being dropped means that people cannot modify the environment anymore using conda.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions