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

Use virtualenv when conda is on PATH #6975

Merged
merged 1 commit into from Nov 9, 2018
Merged

Conversation

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Nov 6, 2018

This uses our proper pinned requirements and is significantly easier to set up and maintain.

doc/source/admin/framework_dependencies.rst Outdated Show resolved Hide resolved
Loading
@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Nov 6, 2018

The selenium errror looks very much unrelated.

Loading

.. caution::

Versions of Galaxy prior to 18.05 could install in to the base/root Conda environment. Consult the correct version
of the documentation for your version of Galaxy.
Copy link
Member

@natefoo natefoo Nov 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep this warning?

Loading

Copy link
Member Author

@mvdbeek mvdbeek Nov 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this would clarify or make things more confusing? I could add a warning to the top that this applies to 19.01 or newer, for older version consult the documentation for your version of Galaxy ?

Loading

Copy link
Member

@natefoo natefoo Nov 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that seems reasonable.

Loading

This uses our proper pinned requirements and is sginificantly easier
to set up and maintain.
@dannon dannon merged commit 3ed0ce8 into galaxyproject:dev Nov 9, 2018
6 checks passed
Loading
@dannon
Copy link
Member

@dannon dannon commented Nov 9, 2018

@mvdbeek Yep, I understand the conda/venv weirdness now -- that was an interesting dive

Loading

100% |████████████████████████████████| 2.2MB 66.1MB/s
Installing collected packages: bx-python
Successfully installed bx-python-0.7.3
A Conda environemnt named ``_galaxy_`` will be created using python 2 and the appropriate virtualenv package will be installed into this environment.
Copy link
Member

@martenson martenson Nov 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/environemnt/environment

Loading

Installing collected packages: bx-python
Successfully installed bx-python-0.7.3
A Conda environemnt named ``_galaxy_`` will be created using python 2 and the appropriate virtualenv package will be installed into this environment.
Using this environemnt a ``.venv`` is initialized. This is a one-time setup, and all other activation and dependency
Copy link
Member

@martenson martenson Nov 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/environemnt/environment

Loading

@nsoranzo nsoranzo deleted the conda_run_sh branch Nov 13, 2018
if [ "$CONDA_DEFAULT_ENV" != "$GALAXY_CONDA_ENV" ]; then
if ! check_conda_env "$GALAXY_CONDA_ENV"; then
echo "Creating Conda environment for Galaxy: $GALAXY_CONDA_ENV"
echo "To avoid this, use the --no-create-venv flag or set \$GALAXY_CONDA_ENV to an"
echo "existing environment before starting Galaxy."
$CONDA_EXE create --yes --name "$GALAXY_CONDA_ENV" 'python=2.7' 'pip>=9'
$CONDA_EXE create --yes --name "$GALAXY_CONDA_ENV" 'python=2.7' 'pip>=9' 'virtualenv=16' -c 'conda-forge'
Copy link
Member

@nsoranzo nsoranzo Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvdbeek Is there any specific reason to pin virtualenv to 16 or can this be relaxed to >=16 ?

Loading

Copy link
Member Author

@mvdbeek mvdbeek Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific reason, >=16 is fine.

Loading

Copy link
Member

@nsoranzo nsoranzo Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I'll adding to the PR I'm working on, thanks!

Loading

nsoranzo added a commit to nsoranzo/galaxy that referenced this issue Dec 14, 2018
- Use `conda_activate`, which works also under dash
- Run `conda_activate` also when `$GALAXY_CONDA_ENV` already exists
- Run `virtualenv` when the conda env is active but `$GALAXY_VIRTUAL_ENV`
  does not exist
- Update the default for `GALAXY_CONDA_ENV` in
  scripts/common_startup_functions.sh

Follow-up on galaxyproject#6975 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants