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

Issues creating and detecting the the iguide environment #70

Open
pmendez00 opened this issue May 26, 2020 · 12 comments
Open

Issues creating and detecting the the iguide environment #70

pmendez00 opened this issue May 26, 2020 · 12 comments

Comments

@pmendez00
Copy link

Hi Christopher,

Thanks for putting iGUIDE together. This is great. While trying to install it has some issues creating the 'iguide' environment. See the screenshot attached. I'm looking forward to giving it a try this week and I would appreciate very much if you could help me out.

Thanks in advance for your time and help!!

Best regards,

Pedro Mendez.

iGUIDE_install_screenshot_Pedro_Mendez

@cnobles
Copy link
Owner

cnobles commented Jun 1, 2020

Hi Pedro,

Thanks for checking out iGUIDE, it's been a lot of fun to put together and I still hope to add some improvements on it.

I'm having issues recreating your issue though. Could you check to see which version of conda you are running? From the verbose installation, it looks like you already had miniconda installed.

I find it easiest to clone iGUIDE into my home directory and then setup up everything from there, rather than a temp directory.

Seeing that miniconda is installed on your system at root level, you may need to get your sys admin to update if that is a problem, or you could have them run the install of iguide and see if that works out.

I've retriggered the automated testing for iGUIDE through CircleCI and also ran it myself on the system used to develop the software, but I couldn't recreate your errors. Neither showed any issues with the installation.

Could you let me know a bit more about what your system is like or your goals of running iGUIDE?

Best,
Chris

image

@pmendez00
Copy link
Author

pmendez00 commented Jun 1, 2020 via email

@guygozlan
Copy link

Hi iGuide team,

I am facing a similar issue.
Trying to clone the repository again from the home directory did not help.

Note that I have anaconda3 installed in addition to the miniconda3. Should it be a problem?

Would really appreciate your help.

Thank you in advanced,
Guy

image

@cnobles
Copy link
Owner

cnobles commented Jun 13, 2020

Hi Guy,

Could you post the results from running the install script with the "-v" flag, this should help in debugging. Seems like there may be some conflict if you have both installed (miniconda and anaconda). If that is an issue, then we could likely just do the install in a more manual fashion, but run it through anaconda.

A manual setup may be helpful if this turns out to be a reoccurring issue.

Best,
Chris

@guygozlan
Copy link

Hi Chris,
Thank you so much for your quick reply.
Please see the screenshot from running with "-v" flag.
If there is a way to do manual setup - it could be very helpful.
Thank you,
Guy

image

@cnobles
Copy link
Owner

cnobles commented Jun 15, 2020

Alright, let's try an manual install. 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.

Installing miniconda

Skip to installing iGUIDE if you already have miniconda or anaconda installed. These can be executed in your home directory.

  1. Get the latest version of miniconda install script.
__conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget -q ${__conda_url} -O miniconda.sh
  1. Installing miniconda through downloaded script. You can choose a different path for the install, here it is installed into the home directory.
__conda_path="~/miniconda3"
bash miniconda.sh -b -p ${__conda_path}
  1. Source conda to activate the installation for use.

source ${__conda_path}/etc/profile.d/conda.sh

Installing iGUIDE

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).

  1. Install the conda environment from the requirements file. The name field here can be changed to what you would like to call the environment, default for the install script is 'iguide'.

conda env update --name=iguide --file etc/requirements.yml

  1. After successful creation of the environment, activate the iguide environment (or what you've called it).

conda activate iguide

  1. Install the supporting R-package into the environment.

R CMD INSTALL tools/iguideSupport

  1. Setup your environmental variables.
__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
  1. Install the command line interface for iGUIDE using pip.

pip install --upgrade tools/iguidelib/

  1. You should now deactivate and reactivate the environment to initiate the environmental variables.
conda deactivate
conda activate iguide

Testing

Tests to make sure the components were installed correctly.

  1. Test for required R-packages installed.

$(Rscript tools/rscripts/check_for_required_packages.R &> /dev/null) && echo true || echo false

  1. Check to make sure iguideSupport was installed correctly.

$(Rscript tools/rscripts/check_pkgs.R iguideSupport &> /dev/null) && echo true || echo false

  1. Run unit tests for iguideSupport.

`$(Rscript tools/rscripts/check_iguideSupport.R &> /dev/null) && echo true || echo false'

  1. Check to make sure the pip install of the CLI was successful.

command -v iguide &> /dev/null && echo true || echo false

  1. Run tests for iGUIDE, this step will take a little bit to complete if it starts processing the test case. Go grab a coffee, you deserve it getting to this point. :) The test will activate the environment as part of the test, so you should deactivate your environment first and then initiate the test.
conda deactivate
bash etc/tests/test.sh iguide

@pmendez00
Copy link
Author

pmendez00 commented Jun 18, 2020 via email

@cnobles
Copy link
Owner

cnobles commented Jun 18, 2020

Really sorry about that, I made a mistake when I was writing the manual install earlier. 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.

Installing miniconda

Skip to installing iGUIDE if you already have miniconda or anaconda installed. These can be executed in your home directory.

  1. Get the latest version of miniconda install script.
__conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget -q ${__conda_url} -O miniconda.sh
  1. Installing miniconda through downloaded script. You can choose a different path for the install, here it is installed into the home directory.
__conda_path="~/miniconda3"
bash miniconda.sh -b -p ${__conda_path}
  1. Source conda to activate the installation for use.

source ${__conda_path}/etc/profile.d/conda.sh

Installing iGUIDE

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).

  1. Install the conda environment from the requirements file. The name field here can be changed to what you would like to call the environment, default for the install script is 'iguide'. This is the part that changed from above.

conda create --name=iguide --quiet --yes --file etc/build.b1.0.1.txt

  1. After successful creation of the environment, activate the iguide environment (or what you've called it).

conda activate iguide

  1. Install the supporting R-package into the environment.

R CMD INSTALL tools/iguideSupport

  1. Setup your environmental variables.
__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
  1. Install the command line interface for iGUIDE using pip.

pip install --upgrade tools/iguidelib/

  1. You should now deactivate and reactivate the environment to initiate the environmental variables.
conda deactivate
conda activate iguide

Testing

Tests to make sure the components were installed correctly.

  1. Test for required R-packages installed.

$(Rscript tools/rscripts/check_for_required_packages.R &> /dev/null) && echo true || echo false

  1. Check to make sure iguideSupport was installed correctly.

$(Rscript tools/rscripts/check_pkgs.R iguideSupport &> /dev/null) && echo true || echo false

  1. Run unit tests for iguideSupport.

`$(Rscript tools/rscripts/check_iguideSupport.R &> /dev/null) && echo true || echo false'

  1. Check to make sure the pip install of the CLI was successful.

command -v iguide &> /dev/null && echo true || echo false

  1. Run tests for iGUIDE, this step will take a little bit to complete if it starts processing the test case. Go grab a coffee, you deserve it getting to this point. :) The test will activate the environment as part of the test, so you should deactivate your environment first and then initiate the test.
conda deactivate
bash etc/tests/test.sh iguide

@pmendez00
Copy link
Author

pmendez00 commented Jun 19, 2020 via email

@cnobles
Copy link
Owner

cnobles commented Jun 20, 2020

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.

Installing miniconda

Skip to installing iGUIDE if you already have miniconda or anaconda installed. These can be executed in your home directory.

  1. Get the latest version of miniconda install script.
__conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget -q ${__conda_url} -O miniconda.sh
  1. Installing miniconda through downloaded script. You can choose a different path for the install, here it is installed into the home directory.
__conda_path="~/miniconda3"
bash miniconda.sh -b -p ${__conda_path}
  1. Source conda to activate the installation for use.

source ${__conda_path}/etc/profile.d/conda.sh

Installing iGUIDE

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).

  1. Install the conda environment from the requirements file. The name field here can be changed to what you would like to call the environment, default for the install script is 'iguide'. This is the part that changed from above.

conda create --name=iguide --quiet --yes --file etc/build.b1.0.1.txt

  1. After successful creation of the environment, activate the iguide environment (or what you've called it).

conda activate iguide

  1. Install the supporting R-package into the environment.

R CMD INSTALL tools/iguideSupport

  1. Setup your environmental variables.
__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
  1. You should now deactivate and reactivate the environment to initiate the environmental variables.
conda deactivate
conda activate iguide
  1. Lastely, install the command line interface for iGUIDE using pip.

pip install --upgrade tools/iguidelib/

Testing

Tests to make sure the components were installed correctly.

  1. Test for required R-packages installed.

$(Rscript tools/rscripts/check_for_required_packages.R &> /dev/null) && echo true || echo false

  1. Check to make sure iguideSupport was installed correctly.

$(Rscript tools/rscripts/check_pkgs.R iguideSupport &> /dev/null) && echo true || echo false

  1. Run unit tests for iguideSupport.

`$(Rscript tools/rscripts/check_iguideSupport.R &> /dev/null) && echo true || echo false'

  1. Check to make sure the pip install of the CLI was successful.

command -v iguide &> /dev/null && echo true || echo false

  1. Run tests for iGUIDE, this step will take a little bit to complete if it starts processing the test case. Go grab a coffee, you deserve it getting to this point. :) The test will activate the environment as part of the test, so you should deactivate your environment first and then initiate the test.
conda deactivate
bash etc/tests/test.sh iguide

@pmendez00
Copy link
Author

pmendez00 commented Jun 27, 2020 via email

@pmendez00
Copy link
Author

pmendez00 commented Jun 29, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants