Install custom_models in conda envs from git (pinned ref) instead of relative path
Snakemake copies env yamls into .snakemake/conda/, where the old '../custom_models' relative pip path no longer resolves and breaks env creation. Pin the ssh git URL to the currently packaged submodule commit; bump the ref together with future submodule updates.
This commit is contained in:
@@ -26,10 +26,10 @@
|
|||||||
- conda/mamba (mamba recommended)
|
- conda/mamba (mamba recommended)
|
||||||
- python env with: python 3.14, snakemake, python-dotenv
|
- python env with: python 3.14, snakemake, python-dotenv
|
||||||
- custom-models package: lives in a separate repo (`git@git.tk-ai.eu:Tom/eDNA_Stream_E01_custom_models.git`)
|
- custom-models package: lives in a separate repo (`git@git.tk-ai.eu:Tom/eDNA_Stream_E01_custom_models.git`)
|
||||||
included here as the `custom_models` git submodule; the workflow pip-installs it from that checkout
|
git-installed by the workflow conda envs (pinned to the submodule commit in `workflow/envs/torch_*.yaml`)
|
||||||
(see `workflow/envs/torch_*.yaml`).
|
|
||||||
- clone with: `git clone --recurse-submodules ...` (or `git submodule update --init` on an existing clone)
|
- clone with: `git clone --recurse-submodules ...` (or `git submodule update --init` on an existing clone)
|
||||||
- update to a newer version: `git submodule update --remote custom_models`, then commit the new pin
|
- update to a newer version: `git submodule update --remote custom_models`, commit it there and push,
|
||||||
|
then bump the `@<ref>` after the package URL in `workflow/envs/torch_*.yaml` and recommit
|
||||||
- `.env` file in `workflow/` with NCBI API key (copy from `.env_example`) — speeds up reference download only
|
- `.env` file in `workflow/` with NCBI API key (copy from `.env_example`) — speeds up reference download only
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ dependencies:
|
|||||||
- pytest>=8
|
- pytest>=8
|
||||||
- pip:
|
- pip:
|
||||||
- pod5
|
- pod5
|
||||||
# E1 genus probe package, checked out as the `custom_models` submodule
|
# E1 genus probe package, git-installed (pinned to the packaged
|
||||||
# in the repo root (torch comes from conda here and satisfies the
|
# submodule commit) rather than a relative-path install: snakemake
|
||||||
# requirement, so only this package gets installed).
|
# copies env yamls into .snakemake/conda/, where relative paths
|
||||||
# Relative path assumes snakemake is invoked from `workflow/`.
|
# break. Bump the ref together with the `custom_models` submodule
|
||||||
- ../custom_models
|
# pointer (git submodule update --remote custom_models).
|
||||||
|
- git+ssh://git@git.tk-ai.eu/Tom/eDNA_Stream_E01_custom_models.git@87c6427
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ dependencies:
|
|||||||
- pip
|
- pip
|
||||||
- pip:
|
- pip:
|
||||||
- pod5
|
- pod5
|
||||||
# E1 genus probe package, checked out as the `custom_models` submodule
|
# E1 genus probe package, git-installed (pinned to the packaged
|
||||||
# in the repo root (torch comes from conda here).
|
# submodule commit) rather than a relative-path install: snakemake
|
||||||
# Relative path assumes snakemake is invoked from `workflow/`.
|
# copies env yamls into .snakemake/conda/, where relative paths
|
||||||
- ../custom_models
|
# break. Bump the ref together with the `custom_models` submodule
|
||||||
|
# pointer (git submodule update --remote custom_models).
|
||||||
|
- git+ssh://git@git.tk-ai.eu/Tom/eDNA_Stream_E01_custom_models.git@87c6427
|
||||||
|
|||||||
Reference in New Issue
Block a user