Open gilfreund opened 4 years ago
I posted this manual install procedure on #70 as well. I should likely update the docs with this process as well. If it's not clear, anything in the code blocks should be input into the command line. My preferred installation has both the miniconda and iGUIDE directories in my home directory.
Skip to installing iGUIDE if you already have miniconda or anaconda installed. These can be executed in your home directory.
__conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget -q ${__conda_url} -O miniconda.sh
__conda_path="~/miniconda3"
bash miniconda.sh -b -p ${__conda_path}
source ${__conda_path}/etc/profile.d/conda.sh
The following commands should be called from within the iGUIDE directory (/path/to/iGUIDE/) after the repository is cloned. (If you need help on this part, just let me know).
conda env update --name=iguide --file etc/requirements.yml
conda activate iguide
R CMD INSTALL tools/iguideSupport
__iguide_dir=$(pwd)
echo -ne "#/bin/sh\nexport IGUIDE_DIR=${__iguide_dir}" > \
${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh
mkdir -p ${CONDA_PREFIX}/etc/conda/deactivate.d/
echo -ne "#/bin/sh\nunset IGUIDE_DIR" > \
${CONDA_PREFIX}/etc/conda/deactivate.d/env_vars.sh
pip install --upgrade tools/iguidelib/
conda deactivate
conda activate iguide
Tests to make sure the components were installed correctly.
$(Rscript tools/rscripts/check_for_required_packages.R &> /dev/null) && echo true || echo false
$(Rscript tools/rscripts/check_pkgs.R iguideSupport &> /dev/null) && echo true || echo false
`$(Rscript tools/rscripts/check_iguideSupport.R &> /dev/null) && echo true || echo false'
command -v iguide &> /dev/null && echo true || echo false
conda deactivate
bash etc/tests/test.sh iguide
Thanks, but I am still getting the error in step 5 (Install the command line interface for iGUIDE using pip.) It seems similar to the error that happened in the install script
$ pip install --upgrade tools/iguidelib/
Processing ./tools/iguidelib
ERROR: Command errored out with exit status 1:
command: /efs/emendo/software/anaconda3/envs/iguide/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/bigdisk/tmp/pip-req-build-s911rl5n/setup.py'"'"'; __file__='"'"'/bigdisk/tmp/pip-req-build-s911rl5n/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /bigdisk/tmp/pip-req-build-s911rl5n/pip-egg-info
cwd: /bigdisk/tmp/pip-req-build-s911rl5n/
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/bigdisk/tmp/pip-req-build-s911rl5n/setup.py", line 19, in <module>
version = get_iguide_version(),
File "/bigdisk/tmp/pip-req-build-s911rl5n/setup.py", line 9, in get_iguide_version
["git", "rev-parse", "--short", "HEAD"], stdout=PIPE
File "/efs/emendo/software/anaconda3/envs/iguide/lib/python3.6/subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "/efs/emendo/software/anaconda3/envs/iguide/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/efs/emendo/software/anaconda3/envs/iguide/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'll look into it, I haven't seen this error before and can't seem to reproduce it. Looks like it has something to do with CLI interfacing with git, essentially to get the versioning of the software. It may be related to how your system is setup though.
Really sorry about the post earlier, I made a mistake when I was writing the manual install. I had you build the environment from the requirements file, but it's suppose to be built using the build file. This bypasses the environmental solving which can take some time. Try the updated install below and let me know how it goes. My preferred installation has both the miniconda and iGUIDE directories in my home directory.
Skip to installing iGUIDE if you already have miniconda or anaconda installed. These can be executed in your home directory.
__conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget -q ${__conda_url} -O miniconda.sh
__conda_path="~/miniconda3"
bash miniconda.sh -b -p ${__conda_path}
source ${__conda_path}/etc/profile.d/conda.sh
The following commands should be called from within the iGUIDE directory (/path/to/iGUIDE/) after the repository is cloned. (If you need help on this part, just let me know).
conda create --name=iguide --quiet --yes --file etc/build.b1.0.1.txt
conda activate iguide
R CMD INSTALL tools/iguideSupport
__iguide_dir=$(pwd)
echo -ne "#/bin/sh\nexport IGUIDE_DIR=${__iguide_dir}" > \
${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh
mkdir -p ${CONDA_PREFIX}/etc/conda/deactivate.d/
echo -ne "#/bin/sh\nunset IGUIDE_DIR" > \
${CONDA_PREFIX}/etc/conda/deactivate.d/env_vars.sh
pip install --upgrade tools/iguidelib/
conda deactivate
conda activate iguide
Tests to make sure the components were installed correctly.
$(Rscript tools/rscripts/check_for_required_packages.R &> /dev/null) && echo true || echo false
$(Rscript tools/rscripts/check_pkgs.R iguideSupport &> /dev/null) && echo true || echo false
`$(Rscript tools/rscripts/check_iguideSupport.R &> /dev/null) && echo true || echo false'
command -v iguide &> /dev/null && echo true || echo false
conda deactivate
bash etc/tests/test.sh iguide
Everithing up to step 5 is fine. I thought it might be git related, so I ran:
git rev-parse --short HEAD
and got
a17daec
Which is indeed May 4th commit.
I think the problem is elseware, in creating .version
in the tmp
directory.
Take 3. So the reason for the pip installation of the CLI failing was due to the environmental variables (IGUIDE_DIR) not being initiated. In step 4, we copy these environmental variables into the startup script for the environment. Since we wrote the data into the script, we haven't sourced the script to make the variables present in the environment. Switching steps 5 and 6 will resolve this issue. As least I has in my hands, as I was able to reproduce an error when following the above method at the pip installation. Remeber, my preferred installation has both the miniconda and iGUIDE directories in my home directory. If you have everything still set up, just activate the environment again and try the CLI pip installation. Otherwise, try the below method. If it works out for everyone, then I'll put this last method in the documentation as a manual installation process.
Skip to installing iGUIDE if you already have miniconda or anaconda installed. These can be executed in your home directory.
__conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget -q ${__conda_url} -O miniconda.sh
__conda_path="~/miniconda3"
bash miniconda.sh -b -p ${__conda_path}
source ${__conda_path}/etc/profile.d/conda.sh
The following commands should be called from within the iGUIDE directory (/path/to/iGUIDE/) after the repository is cloned. (If you need help on this part, just let me know).
conda create --name=iguide --quiet --yes --file etc/build.b1.0.1.txt
conda activate iguide
R CMD INSTALL tools/iguideSupport
__iguide_dir=$(pwd)
echo -ne "#/bin/sh\nexport IGUIDE_DIR=${__iguide_dir}" > \
${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh
mkdir -p ${CONDA_PREFIX}/etc/conda/deactivate.d/
echo -ne "#/bin/sh\nunset IGUIDE_DIR" > \
${CONDA_PREFIX}/etc/conda/deactivate.d/env_vars.sh
conda deactivate
conda activate iguide
pip install --upgrade tools/iguidelib/
Tests to make sure the components were installed correctly.
$(Rscript tools/rscripts/check_for_required_packages.R &> /dev/null) && echo true || echo false
$(Rscript tools/rscripts/check_pkgs.R iguideSupport &> /dev/null) && echo true || echo false
`$(Rscript tools/rscripts/check_iguideSupport.R &> /dev/null) && echo true || echo false'
command -v iguide &> /dev/null && echo true || echo false
conda deactivate
bash etc/tests/test.sh iguide
Progress! Switching the steps indeed fixed the errors.
Now, in the tests, when I run
command -v iguide &> /dev/null && echo true || echo false
I get:
true
However:
conda deactivate
bash etc/tests/test.sh iguide
Fails.
This is due to the line
source ${HOME}/miniconda3/etc/profile.d/conda.sh
That assumes that miniconda is in the home directory, and that this is using miniconda (I am using anaconda).
After changing this to our conda location, this works.
It might make more sense to require the the tests to be run after the conda environment is active (will remove some of the guesswork / assumptions from the test script) or add a parameters to the test script pointing to the conda environment
Great point, when I wrote this portion of the install script, I wasn't considering others may be using anaconda. The test bash script does try to activate the conda environment (as you've pointed out) prior to initiating the tests, but this assumes miniconda is installed. I'll keep this issue open till I make the update to the install and test scripts. Thanks for this suggestion!
Hello,
Running the install script fails in install IGUIDE library section.
I am installing on an NFS share, which is also where our shared conda (version 4.8.3) installation and environments exist.
Command:
bash install.sh -v --conda /efs/emendo/software/anaconda3
Output:This might be related to #70 , but the conda environments seems to be be created with no errors. I am attaching a capture of the install process in debug
bash install.sh -d --conda /efs/emendo/software/anaconda3
debug.logThanks