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

[Feature] storing config files in local data/output directory instead of in conda env installation directory #46

Open
jjtukker opened this issue Mar 2, 2022 · 1 comment
Labels
enhancement New feature or request migrated-from-cellfinder For issues that were inherited from the migration of cellfinder into this package.

Comments

@jjtukker
Copy link

jjtukker commented Mar 2, 2022

Is your feature request related to a problem? Please describe.
We are using a cluster (Ubuntu 20.04), with several users that each have their own home directory and log in remotely. We have a central conda environment (on /scratch) which can then be used by different users via a link to their home individual miniconda environments. Unfortunately, this does not work for cellfinder since it saves config files in the installation env, rather than in the home directory (or wherever the data/output files are). This leads to permission errors because the central conda environment should not be changeable by users. Even if we do give permission, the config file refers to the local user directory of whoever first writes it, which creates problems.

Describe the solution you'd like
It would be great if cellfinder could save all files in the output folder instead of in the conda env directory (right now there are two conf files which are saved, in our case, in "/scratch/rootconda/envs/cellfinder/lib/python3.10/site-packages/bg_atlasapi/" and "/scratch/rootconda/envs/cellfinder/lib/python3.10/site-packages/cellfinder_core/config/"). Or, if this might cause problems for existing setups, to add an option on the command-line to say "saveconfiglocal" or something like that.

Describe alternatives you've considered
Unfortunately dockers are not a viable solution on a multi-user system like ours. Generating copies of the central conda environment on local directories does not work (we tried cp, conda clone, and conda-pack but having pip and conda together causes problems). Having each user install cellfinder in their local conda env on their home directory is possible, but so far has been challenging for many users (given the challenges related to tensorflow and GPU-compatibility, and issues related to having to use conda/conda-forge and pip together). We think a cleaner separation of specific config files (it seems there are just 2?) from the general installation would be preferable. Hopefully it is easy to implement?

@jjtukker jjtukker added the enhancement New feature or request label Mar 2, 2022
@adamltyson
Copy link
Member

Hi @jjtukker,

This should be possible without any changes to the code (which unfortunately i don't have time for). I've installed cellfinder centrally on an HPC system. What I would do is:

  • Download the cellfinder default model to a centrally accessible location using cellfinder_download --install-path /path/to/central/storage.
  • Manually edit CONDA_ENV/lib/python3.8/site-packages/bg_atlasapi/bg_config.conf to point to where you want to download the atlases, then download any that may be needed with e.g. brainglobe install -a allen_mouse_50um`)

To get around the fudge for the atlas API, you could install bg-atlasapi from GitHub to take advantage of this PR. I'd also welcome PR to cellfinder based on that other PR to fix this properly.

I think this means that users won't have to edit any files in the conda env, but this isn't how I've set up shared installations before. Previously, I''ve set up a cellfinder module and I could share the set up with you if the sysadmins would allow it.

Adam

@adamltyson adamltyson removed their assignment Mar 2, 2022
willGraham01 referenced this issue in brainglobe/cellfinder Sep 1, 2023
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.276 → v0.0.277](astral-sh/ruff-pre-commit@v0.0.276...v0.0.277)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@willGraham01 willGraham01 transferred this issue from brainglobe/cellfinder Dec 13, 2023
@willGraham01 willGraham01 added the migrated-from-cellfinder For issues that were inherited from the migration of cellfinder into this package. label Dec 13, 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 migrated-from-cellfinder For issues that were inherited from the migration of cellfinder into this package.
Projects
Status: Backlog
Development

No branches or pull requests

3 participants