Hello,
I have installed miniconda on the workstation which i access over ssh. I have all my environments set up which I use over and over.
Now I am writing script files which access a particular tool from is environment and execute the command. for example for spades i have created this file
# Initialize the spades assembler path
spades=/scratch/miniconda_envs/sr_spades/bin/spades.py
$spades -k 21 33 55 77 99 111 127 --isolate -1 $Read1 -2 $Read2 -t $Threads -o $OutDir 2>&1 | tee $OutDir/${isolate}_spades.log
So I manually initialize the required tool. Sometimes It works but sometimes i still have to activate
the environment because tool requires other dependencies.
Is there any way to use conda environments without activating them ?
I mean if i initialize a tool from a particular conda environment like above, and it automatically looks for its dependencies in the same path.
I once saw a post which had mentioned something like stop activating and deactivating environments and it had the following code to install conda.
#!/bin/bash
# save as install.sh
set -e
# download and install conda in the current directory
CONDASH=Miniconda3-4.5.4-Linux-x86_64.sh
wget https://repo.anaconda.com/miniconda/${CONDASH}
bash "${CONDASH}" -b -p conda
rm -f "${CONDASH}"
# set the environment to use the conda you installed
# re-use these configs for wrapper scripts to run your R, Python, etc., scripts
export PATH=${PWD}/conda/bin:${PATH}
unset PYTHONPATH
unset PYTHONHOME
# install the conda packages you wanted
conda install -y somechannel::somepackage==1.2.3
I couldn't understand how this can relief me from activating and and deactivating environments again and again.
Can you share your views on this?
Thank You
Do you know if a "normal" user can install
pixi
? Thanks for posting this.and then you should be good to go. Installation by default goes into ~/.pixi so there might be problems with HPC where home directory file counts are limited.