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

Conda not included in docker-base image #32

Closed
fanninpm opened this issue Jun 3, 2021 · 2 comments
Closed

Conda not included in docker-base image #32

fanninpm opened this issue Jun 3, 2021 · 2 comments
Labels
enhancement New feature or request proposal Proposals that warrant further discussion

Comments

@fanninpm
Copy link

fanninpm commented Jun 3, 2021

Current Behavior
When I run nextstrain with the --use-conda option, snakemake complains about the absence of a conda executable.

Expected behavior
This command should be able to install and use the conda environment.

How to reproduce
Steps to reproduce the current behavior:

  1. nextstrain check-setup --set-default should return with Setting default environment to docker.
  2. nextstrain build ncov/ --use-conda --profile path/to/profile -p
  3. See error:
Building DAG of jobs...
CreateCondaEnvironmentException:
The 'conda' command is not available in the shell /bin/bash that will be used by Snakemake. You have to ensure that it is in your PATH, e.g., first activating the conda base environment with `conda activate base`.
  File "/usr/local/lib/python3.7/site-packages/snakemake/deployment/conda.py", line 232, in create
  File "/usr/local/lib/python3.7/site-packages/snakemake/deployment/conda.py", line 343, in __new__
  File "/usr/local/lib/python3.7/site-packages/snakemake/deployment/conda.py", line 356, in __init__
  File "/usr/local/lib/python3.7/site-packages/snakemake/deployment/conda.py", line 396, in _check

Possible solution
Is there a way to include a conda installation in the Docker image?

Your environment: if running Nextstrain locally

  • Operating system: Debian GNU/Linux 10 (buster)
  • Version (e.g. auspice 2.7.0): nextstrain/base:build-20210413T201712Z

Additional context
I'd like to get this working so I could potentially run Pangolin on the build (without installing it in a place that's already cramped for space).

@fanninpm fanninpm added the bug Something isn't working label Jun 3, 2021
@huddlej
Copy link
Contributor

huddlej commented Jun 3, 2021

Thank you for documenting this issue, @fanninpm! It looks like the proximal issue is that the base Docker image does not include Pangolin. I've created a separate issue describing the need to have Pangolin installed.

In the short term, if it is possible for you to turn off Docker and re-run nextstrain check-setup --set-default to use the native environment, then the command you're running should work as expected.

The ultimate issue of whether to include Conda in the base Docker image is trickier. We currently view Docker and Conda as mutually exclusive solutions to environment management such that including Conda in the Docker image defeats the original purpose of the image. However, since some tools like Pangolin are most readily installed through Conda and need to be available through the Docker image, it is possible we'll need to support Conda anyway.

@tsibley tsibley added enhancement New feature or request proposal Proposals that warrant further discussion and removed bug Something isn't working labels Nov 16, 2021
@victorlin
Copy link
Member

I don't think we want to support Snakemake's --use-conda in the Docker runtime. There's been updates to Nextstrain since this issue was created, and we now have more runtimes options. --use-conda falls under the advanced use case of managing Conda environments, which we recommend the ambient runtime for.

@victorlin victorlin closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal Proposals that warrant further discussion
Projects
None yet
Development

No branches or pull requests

4 participants