From dade35ff0d3e639d2a4175337edbe3c4ac148b5a Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Sun, 21 Mar 2021 05:30:05 -0400 Subject: [PATCH 1/5] MAINT: installation scripts with hnn-core --- installer/ubuntu/hnn-ubuntu.sh | 95 +++++++++++++++++++++---------- installer/windows/hnn-windows.ps1 | 51 ++++++++--------- 2 files changed, 89 insertions(+), 57 deletions(-) diff --git a/installer/ubuntu/hnn-ubuntu.sh b/installer/ubuntu/hnn-ubuntu.sh index 4af9990d8..46b1bb888 100755 --- a/installer/ubuntu/hnn-ubuntu.sh +++ b/installer/ubuntu/hnn-ubuntu.sh @@ -3,6 +3,7 @@ set -e [[ "$LOGFILE" ]] || LOGFILE="ubuntu_install.log" +[[ "$USE_CONDA" ]] || USE_CONDA=0 function start_download { echo "Downloading $2" @@ -61,17 +62,17 @@ echo "Using python version $PYTHON_VERSION" | tee -a "$LOGFILE" export DEBIAN_FRONTEND=noninteractive echo "Updating package repository..." | tee -a "$LOGFILE" -sudo -E apt-get update &>> "$LOGFILE" +sudo -E apt-get update &> "$LOGFILE" echo "Updating OS python packages..." | tee -a "$LOGFILE" if [[ "${PYTHON_VERSION}" =~ "3.7" ]] && [[ "$DISTRIB" =~ "bionic" ]]; then - sudo -E apt-get install --no-install-recommends -y python3.7 python3-pip python3.7-tk python3.7-dev &>> "$LOGFILE" && \ - sudo python3.7 -m pip install --upgrade pip setuptools &>> "$LOGFILE" + sudo -E apt-get install --no-install-recommends -y python3.7 python3-pip python3-tk python3.7-dev &> "$LOGFILE" && \ + sudo python3.7 -m pip install --upgrade pip setuptools &> "$LOGFILE" sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so \ /usr/lib/python3/dist-packages/apt_pkg.so else - sudo -E apt-get install --no-install-recommends -y python3 python3-pip python3-tk python3-setuptools &>> "$LOGFILE" && \ - sudo pip3 install --upgrade pip &>> "$LOGFILE" + sudo -E apt-get install --no-install-recommends -y python3 python3-pip python3-tk python3-setuptools &> "$LOGFILE" && \ + sudo pip3 install --upgrade pip &> "$LOGFILE" fi if which python3 &> /dev/null; then @@ -87,22 +88,68 @@ elif which python &> /dev/null; then fi echo "Using python: $PYTHON with pip: $PIP" | tee -a "$LOGFILE" +if [[ "$USE_CONDA" -eq 0 ]]; then + echo "Downloading python packages for HNN with pip..." | tee -a "$LOGFILE" + $PIP download pyqt5 nlopt psutil hnn-core &> "$LOGFILE" & + PIP_PID=$! +fi + echo "Installing OS compilation toolchain..." | tee -a "$LOGFILE" # get prerequisites from pip. requires gcc to build psutil sudo -E apt-get install --no-install-recommends -y \ - make gcc g++ python3-dev &>> "$LOGFILE" + make gcc g++ python3-dev &> "$LOGFILE" + +if [[ "$USE_CONDA" -eq 0 ]]; then + echo "Waiting for python packages for HNN downloads to finish..." + NAME="downloading python packages for HNN " + wait_for_pid "${PIP_PID}" "$NAME" + + # install hnn-core and prerequisites (e.g. NEURON) + echo "Installing python prequisites for HNN with pip..." | tee -a "$LOGFILE" + $PIP install --no-cache-dir pyqt5 nlopt psutil hnn-core &> "$LOGFILE" + + # WSL may not have nrnivmodl in PATH + if ! which nrnivmodl &> /dev/null; then + export PATH="$PATH:$HOME/.local/bin" + echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc + fi +else + URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" + FILENAME="$HOME/miniconda.sh" + start_download "$FILENAME" "$URL" + + echo "Installing miniconda..." + chmod +x "$HOME/miniconda.sh" + "$HOME/miniconda.sh" -b -p "${HOME}/Miniconda3" + export PATH=${HOME}/Miniconda3/bin:$PATH -$PIP install --no-cache-dir NEURON + # create conda environment + conda env create -f environment.yml -# WSL may not have nrnivmodl in PATH -if ! which nrnivmodl &> /dev/null; then - export PATH="$PATH:$HOME/.local/bin" - echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc + # conda is faster to install nlopt + conda install -y -n hnn -c conda-forge nlopt + + source activate hnn && echo "activated conda HNN environment" + + echo "Installing MPI compilation toolchain..." | tee -a "$LOGFILE" + # get prerequisites to build mpi4py + sudo -E apt-get install --no-install-recommends -y \ + libopenmpi-dev &> "$LOGFILE" + + # install hnn-core and prerequisites (e.g. NEURON) + pip install mpi4py pyqt5 hnn-core fi -echo "Installing python packages for HNN with pip..." | tee -a "$LOGFILE" -$PIP install --no-cache-dir --user matplotlib PyOpenGL \ - pyqt5 pyqtgraph scipy numpy nlopt psutil &>> "$LOGFILE" +echo "Downloading runtime prerequisite packages..." | tee -a "$LOGFILE" +apt-get download \ + openmpi-bin lsof libfontconfig1 libxext6 libx11-xcb1 libxcb-glx0 \ + libxkbcommon-x11-0 libgl1-mesa-glx \ + libc6-dev libtinfo-dev libncurses5-dev \ + libx11-dev libreadline-dev \ + libxcb-icccm4 libxcb-util1 libxcb-image0 libxcb-keysyms1 \ + libxcb-render0 libxcb-shape0 libxcb-randr0 libxcb-render-util0 \ + libxcb-xinerama0 &> "$LOGFILE" & +APT_DOWNLOAD=$! # save dir installing hnn to startdir=$(pwd) @@ -115,11 +162,11 @@ if [[ $TRAVIS_TESTING -ne 1 ]]; then cd hnn_source_code if [ -d "$source_code_dir/.git" ]; then - git pull origin master &>> "$LOGFILE" + git pull origin master &> "$LOGFILE" fi else echo "Downloading and extracting HNN..." | tee -a "$LOGFILE" - wget --no-hsts --no-check-certificate -O hnn.tar.gz https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz | tee -a "$LOGFILE" + wget -O hnn.tar.gz https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz | tee -a "$LOGFILE" mkdir hnn_source_code tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code &>> "$LOGFILE" && \ cd hnn_source_code &>> "$LOGFILE" @@ -132,10 +179,6 @@ else fi fi -echo "Building HNN..." | tee -a "$LOGFILE" -make -j4 &>> "$LOGFILE" -MAKE_PID=$! - # create the global session variables echo '# these lines define global session variables for HNN' >> ~/.bashrc echo "export PATH=\$PATH:\"$source_code_dir\"" >> ~/.bashrc @@ -147,7 +190,7 @@ if [[ -d "$HOME/Desktop" ]]; then cp -f hnn.desktop "$HOME/Desktop" && \ sed -i "s~/home/hnn_user\(.*\)$~\"$startdir\"\1~g" "$HOME/Desktop/hnn.desktop" && \ chmod +x "$HOME/Desktop/hnn.desktop" - } &>> "$LOGFILE" + } &> "$LOGFILE" fi echo "Installing prerequisites..." | tee -a "$LOGFILE" @@ -160,17 +203,11 @@ sudo -E apt-get install --no-install-recommends -y \ libx11-dev libreadline-dev \ libxcb-icccm4 libxcb-util1 libxcb-image0 libxcb-keysyms1 \ libxcb-render0 libxcb-shape0 libxcb-randr0 libxcb-render-util0 \ - libxcb-xinerama0 libxcb-xfixes0 &>> "$LOGFILE" + libxcb-xinerama0 libxcb-xfixes0 &> "$LOGFILE" # Clean up a little echo "Cleaning up..." | tee -a "$LOGFILE" -sudo -E apt-get clean &>> "$LOGFILE" - -if [[ $TRAVIS_TESTING -ne 1 ]]; then - echo "Waiting for HNN module build to finish..." - NAME="building HNN modules" - wait_for_pid "${MAKE_PID}" "$NAME" -fi +sudo -E apt-get clean &> "$LOGFILE" echo "HNN installation successful" | tee -a "$LOGFILE" echo "Source code is at $source_code_dir" | tee -a "$LOGFILE" diff --git a/installer/windows/hnn-windows.ps1 b/installer/windows/hnn-windows.ps1 index ccb092abf..c8759ffe8 100644 --- a/installer/windows/hnn-windows.ps1 +++ b/installer/windows/hnn-windows.ps1 @@ -6,7 +6,7 @@ install Miniconda: - Miniconda3-latest-Windows-x86_64.exe Additionally the following will be installed if they are not found: - - nrn-7.7.w64-mingwsetup.exe + - nrn-7.8.w64-mingwsetup.exe Other requirements: - Only 64-bit installs are supported due to NEURON compatibility @@ -310,8 +310,8 @@ if ($script:installMiniconda) { $program = "NEURON" if (!(Test-Installed($program))) { - $file = "nrn-7.7.w64-mingwsetup.exe" - $url = "https://neuron.yale.edu/ftp/neuron/versions/v7.7/$file" + $file = "nrn-7.8.w64-mingwsetup.exe" + $url = "https://neuron.yale.edu/ftp/neuron/versions/v7.8/$file" Download-Program $program $file $url $dirpath = $script:NEURON_PATH Write-Host "Installing $program to $dirpath..." @@ -379,6 +379,13 @@ if ($proc1) { Write-Host "Miniconda is finished" } +if ($proc2) { + Write-Host "Waiting for NEURON install to finish..." + $proc2.WaitForExit() 2>$null + Update-User-Paths("$script:NEURON_PATH\bin") + Write-Host "NEURON is finished" +} + # setup python with virtualenv or 'conda if ($null -ne $script:VIRTUALENV) { Write-Host "Creating Python virtualenv at $HOME\venv\hnn..." @@ -390,7 +397,9 @@ if ($null -ne $script:VIRTUALENV) { $script:PYTHON = "$HOME\venv\hnn\Scripts\python.exe" if (Test-Python-3($script:PYTHON)) { # use pip3 for good measure - Start-Process "$HOME\venv\hnn\Scripts\pip3" "install PyOpenGL pyqtgraph matplotlib scipy PyQt5 psutil nlopt" -Wait + Start-Process "$HOME\venv\hnn\Scripts\pip3" "install matplotlib scipy PyQt5 psutil nlopt" -Wait + # get hnn-core, but skip NEURON dependency + Start-Process "$HOME\venv\hnn\Scripts\pip3" "install --no-deps mpi4py hnn-core" -Wait } else { Write-Warning "Virtualenv failed to create a valid python3 environment" @@ -415,14 +424,21 @@ elseif ($null -ne $script:CONDA_PATH) { if (!$script:env_exists) { Write-Host "Setting up anaconda hnn environment..." - conda create -y -n hnn python=3.7 PyOpenGL pyqtgraph matplotlib scipy conda psutil + conda env create -f environment.yml conda install -y -n hnn -c conda-forge nlopt + + # need to call the right pip to install in miniconda environment + # get hnn-core, but skip NEURON dependency + Set-Location $HOME + Miniconda3\envs\hnn\Scripts\pip install --no-deps mpi4py hnn-core + Set-Location $CONDA_ENV mkdir .\etc\conda\activate.d 2>&1>$null mkdir .\etc\conda\deactivate.d 2>&1>$null - #"set NRN_PYLIB=$script:PYTHON_DLL" | Set-Content "$CONDA_ENV\etc\conda\activate.d\env_vars.bat" - "set PYTHONHOME=$CONDA_ENV" | Add-Content "$CONDA_ENV\etc\conda\activate.d\env_vars.bat" + # "set NRN_PYLIB=$script:PYTHON_DLL" | Set-Content "$CONDA_ENV\etc\conda\activate.d\env_vars.bat" + "set PYTHONPATH=$script:NEURON_PATH\lib\python" | Add-Content "$CONDA_ENV\etc\conda\activate.d\env_vars.bat" + "export PYTHONPATH=/c/nrn/lib/python" | Add-Content "$CONDA_ENV\etc\conda\activate.d\env_vars.sh" } else { Write-Host "Miniconda hnn environment already exists" @@ -433,27 +449,6 @@ else { } - -if ($proc2) { - Write-Host "Waiting for NEURON install to finish..." - $proc2.WaitForExit() 2>$null - Update-User-Paths("$script:NEURON_PATH\bin") - Write-Host "NEURON is finished" -} - -if (!(Test-Path "$HNN_PATH\nrnmech.dll" -PathType Leaf)) { - Write-Host "Creating nrnmech.dll" - Set-Location $HNN_PATH\mod - Start-Process "$script:NEURON_PATH\mingw\usr\bin\sh.exe" "$script:NEURON_ESC_PATH/lib/mknrndll.sh C:\nrn\" - $obj = New-Object -com Wscript.Shell - sleep -s 10 - $obj.SendKeys("{ENTER}") - Copy-Item $HNN_PATH\mod\nrnmech.dll -Destination $HNN_PATH -} -else { - Write-Host "nrnmech.dll already exists $HNN_PATH\nrnmech.dll" -} - Write-Host "" Write-Host "Finished installing HNN and prerequisites." Write-Host "Activate the environment from cmd.exe (not Powershell):" From a8ff92975829e567b185edeb96cd8d50fe92b752 Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Sun, 21 Mar 2021 07:43:13 -0400 Subject: [PATCH 2/5] DOC: update install docs for post-integration --- installer/centos/README.md | 10 ++- installer/mac/README.md | 75 +++++++--------- installer/mac/check-post.sh | 130 +++++++--------------------- installer/mac/check-pre.sh | 3 +- installer/ubuntu/README.md | 55 +++++++++--- installer/ubuntu/hnn-ubuntu.sh | 7 +- installer/windows/native_install.md | 4 +- installer/windows/wsl.md | 8 +- scripts/setup-travis-osx.sh | 4 +- 9 files changed, 123 insertions(+), 173 deletions(-) diff --git a/installer/centos/README.md b/installer/centos/README.md index 7f452d5d0..f08c66cf4 100644 --- a/installer/centos/README.md +++ b/installer/centos/README.md @@ -1,4 +1,4 @@ -# HNN "Python" install (CentOS) +# HNN install (CentOS) The script below assumes that it can update OS packages for python and prerequisites for HNN. @@ -33,18 +33,20 @@ The script below assumes that it can update OS packages for python and prerequis ## Upgrading to a new version of HNN -HNN Releases can be seen on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). +HNN Releases can be found on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). -To download the latest release, use the following commands within an Ubuntu terminal: +To download the latest HNN release: ```bash curl --remote-name https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz +mkdir hnn_source_code tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code cd hnn_source_code -make python3 hnn.py ``` +If you are using `git`, then run `git pull origin master` from the source code directory. + ## Troubleshooting If you run into other issues with the installation, please [open an issue on our GitHub](https://github.com/jonescompneurolab/hnn/issues). Our team monitors these issues and will investigate possible fixes. diff --git a/installer/mac/README.md b/installer/mac/README.md index 49f56553f..653aa6238 100644 --- a/installer/mac/README.md +++ b/installer/mac/README.md @@ -1,4 +1,4 @@ -# HNN "Python" install (Mac OS) +# HNN install (Mac OS) ## Opening a terminal window @@ -9,12 +9,12 @@ - The command below will run a script to check for existing installations of prerequisites. If a compatible version is installed, it will say which steps can be skipped below. ```bash - curl -s "https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/mac/check-pre.sh" | bash + curl -s "https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/mac/check-pre.sh" | bash ``` ## Prerequisite 1: Xcode Command Line Tools -The Xcode Command Line Tools package includes utilities for compiling code from the terminal (gcc, make, etc.). This is needed for compiling mod files in NEURON. +The Xcode Command Line Tools package includes utilities for compiling code from the terminal. This is needed for compiling NEURON mod files during the hnn-core installation. 1. To install the package, type the following from a terminal.app window: @@ -46,58 +46,37 @@ The Xcode Command Line Tools package includes utilities for compiling code from ```bash conda env create -f environment.yml + conda install -y -n hnn openmpi mpi4py ``` -2. Activate the HNN conda environment and install nlopt and NEURON +2. Activate the HNN conda environment and python prerequisite packages ```bash - source activate hnn - pip install nlopt NEURON - ``` - -3. Set the LD_LIBRARY_PATH for openmpi on conda activation. This environnement variable must be set before HNN can run simulations with openmpi. The variable is only useful inside the 'hnn' conda environment, so we will set the variable when conda is activated with `source activate hnn`. Run the following commands to make this automatic. - - ```bash - cd ${CONDA_PREFIX} - mkdir -p etc/conda/activate.d etc/conda/deactivate.d - echo "export OLD_LD_LIBRARY_PATH=\$LD_LIBRARY_PATH" >> etc/conda/activate.d/env_vars.sh - echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\${CONDA_PREFIX}/lib" >> etc/conda/activate.d/env_vars.sh - echo "export LD_LIBRARY_PATH=\$OLD_LD_LIBRARY_PATH" >> etc/conda/deactivate.d/env_vars.sh - echo "unset OLD_LD_LIBRARY_PATH" >> etc/conda/deactivate.d/env_vars.sh - ``` - -4. Open a new terminal window for the settings in the previous step to take effect and activate the HNN conda environment - - ```bash - source activate hnn + conda activate hnn + pip install hnn-core + pip install nlopt + pip install mpi4py ``` ## Run post-install checks -- Run the command below to check that all of the steps were successful and are ready to run HNN. - - ```bash - curl -s "https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/mac/check-post.sh" | bash - ``` +```bash +curl -s "https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/mac/check-post.sh" | bash +``` ## Download HNN source code -- The following commands will download the hnn source code and compile HNN's mod files for NEURON. We use the directory `hnn_source_code` for consistency with all of our instructions, but any directory can be used. You can use `git` if you prefer. - - ```bash - curl -OL https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz - mkdir hnn_source_code - tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code - cd hnn_source_code - make - ``` +```bash +git clone https://github.com/jonescompneurolab/hnn.git +cd hnn +``` ## Run the HNN model -1. Start the HNN GUI from a terminal window: +1. Start the HNN GUI from a terminal window. Make sure the hnn environment has been activated each time a terminal window is opened: ```bash - source activate hnn + conda activate hnn python hnn.py ``` @@ -109,16 +88,26 @@ The Xcode Command Line Tools package includes utilities for compiling code from -4. You can now proceed to running the tutorials at https://hnn.brown.edu/index.php/tutorials/ . Some things to note: +4. You can now proceed to running the tutorials at [https://hnn.brown.edu/index.php/tutorials/](https://hnn.brown.edu/index.php/tutorials/) . Some things to note: + - A directory called "hnn_out" exists in your home directory where the results from your simulations (data and param files) will be stored. ## Upgrading to a new version of HNN -HNN Releases can be seen on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). +HNN Releases can be found on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). + +To download the latest HNN release: -If you downloaded the `tar.gz` file, simply re-run the steps above, but replace `hnn_source_code` with a new directory name. +```bash +curl -OL https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz +mkdir hnn_source_code +tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code +cd hnn_source_code +conda activate hnn +python3 hnn.py +``` -Otherwise, if you are using `git`, then run `git pull origin master` from the source code directory. +If you are using `git`, then run `git pull origin master` from the source code directory. ## Troubleshooting diff --git a/installer/mac/check-post.sh b/installer/mac/check-post.sh index df71702d3..3ac2d09d2 100755 --- a/installer/mac/check-post.sh +++ b/installer/mac/check-post.sh @@ -28,34 +28,6 @@ echo "--------------------------------------" CUR_DIR=$(pwd) -echo -n "Checking if HNN is compiled..." -if [[ -f ${CUR_DIR}/hnn.py ]]; then - if [[ -f "${CUR_DIR}/x86_64/hh2.mod" ]]; then - echo "ok" - if [[ "$VERBOSE" -eq "1" ]]; then - echo "HNN source code compiled and ready to use at ${CUR_DIR}" - echo - fi - else - echo "failed" - echo "Found a source code directory at ${CUR_DIR}, but it needs to be compiled (run make)." - echo - return=2 - fi -else - if [[ -f "$HOME/hnn/x86_64/hh2.mod" ]]; then - echo "warning" - echo "Did you mean to run this from $HOME/hnn instead?" - echo - return=1 - else - echo "failed" - echo "Didn't find HNN source code in this directory" - echo - return=2 - fi -fi - echo -n "Checking for miniconda..." MINICONDA_FOUND= which conda > /dev/null 2>&1 @@ -161,24 +133,6 @@ else echo "ok" fi -MPI_WORKS= -if [[ "$MPI_FOUND" -eq "1" ]]; then - echo -n "Checking MPI functionality..." - COMMAND="mpiexec -n 1 echo \"hello\" 2>&1" - OUTPUT=$(mpiexec -n 1 echo "hello" 2>&1) - if [[ "$?" -eq "0" ]] && [[ "$OUTPUT" =~ "hello" ]]; then - echo "ok" - MPI_WORKS=1 - else - echo "failed" - echo "the command that failed was:" - echo "$COMMAND" - echo $OUTPUT - echo - return=2 - fi -fi - # NEURON functionality checks from https://github.com/jonescompneurolab/hnn/issues/11 NRNIV_WORKS= if [[ "$NRN_FOUND" -eq "1" ]]; then @@ -202,7 +156,7 @@ else fi PREREQS_INSTALLED=1 -for prereq in "matplotlib" "scipy" "psutil" "numpy" "nlopt" "neuron"; do +for prereq in "matplotlib" "scipy" "psutil" "numpy" "nlopt" "neuron" "hnn_core"; do echo -n "Checking Python can import $prereq module..." $PYTHON -c "import $prereq" > /dev/null 2>&1 if [[ "$?" -eq "0" ]]; then @@ -237,47 +191,24 @@ else echo "Skipping NEURON funtionality tests with Python." fi -echo -n "Checking for setting LD_LIBRARY_PATH..." -source ${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh > /dev/null 2>&1 -if [[ "$?" -eq "0" ]] && [[ -n "${LD_LIBRARY_PATH}" ]]; then - echo "ok" -else - echo "warning" - echo "The LD_LIBRARY_PATH variable is not set correctly. Make sure you follow the installation" - echo "instructions to add the correct lines to ${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh" - return=1 -fi - - MPI_AND_NRNIV_WORKS= -if [[ "$NRN_FOUND" -eq "1" ]] && [[ "$NRNIV_WORKS" -eq "1" ]] && [[ "$MPI_WORKS" -eq "1" ]]; then +if [[ "$NRN_FOUND" -eq "1" ]] && [[ "$NRNIV_WORKS" -eq "1" ]]; then echo -n "Checking NEURON nrniv funtionality with MPI..." - mpiexec -n 2 nrniv -nobanner -nopython -mpi -c 'quit()' > /dev/null 2>&1 + COMMAND="mpiexec -n 2 nrniv -nobanner -nopython -mpi -c 'quit()'" + OUTPUT=$(export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib; mpiexec -n 2 nrniv -nobanner -nopython -mpi -c 'quit()') if [[ "$?" -eq "0" ]]; then echo "ok" MPI_AND_NRNIV_WORKS=1 else - # try with LD_LIBRARY_PATH - COMMAND="mpiexec -n 2 nrniv -nobanner -nopython -mpi -c 'quit()'" - OUTPUT=$(export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib; mpiexec -n 2 nrniv -nobanner -nopython -mpi -c 'quit()') - if [[ "$?" -eq "0" ]]; then - echo "warning" - echo "The LD_LIBRARY_PATH variable is not set correctly. Make sure you follow the installation" - echo "instructions to add the correct lines to ${CONDA_PREFIX}/etc/conda/activate.d/env_vars.sh" - echo - return=1 - MPI_AND_NRNIV_WORKS=1 - else - echo "failed" - echo "Could not run nrniv with MPI" - echo "The command that failed was:" - echo "$COMMAND" - echo "Tried environment variable LD_LIBRARY_PATH=${CONDA_PREFIX}/lib" - echo "Command output (on a single line):" - echo $OUTPUT - echo - return=2 - fi + echo "failed" + echo "Could not run nrniv with MPI" + echo "The command that failed was:" + echo "$COMMAND" + echo "Tried environment variable LD_LIBRARY_PATH=${CONDA_PREFIX}/lib" + echo "Command output (on a single line):" + echo $OUTPUT + echo + return=2 fi else echo "Skipping NEURON funtionality tests with MPI." @@ -285,24 +216,27 @@ fi NRNIV_AND_PYTHON_AND_MPI_WORKS= if [[ "$NRN_FOUND" -eq "1" ]] && [[ "$NRNIV_WORKS" -eq "1" ]] && - [[ "$PREREQS_INSTALLED" -eq "1" ]] && [[ "$MPI_WORKS" -eq "1" ]] && + [[ "$PREREQS_INSTALLED" -eq "1" ]] && [[ "$MPI_AND_NRNIV_WORKS" -eq "1" ]]; then - echo -n "Checking NEURON nrniv funtionality with Python and MPI..." - COMMAND="mpiexec -n 2 nrniv -nobanner -mpi -python -c 'from neuron import h; pc = h.ParallelContext(); h.quit()' 2>&1" - OUTPUT=$(mpiexec -n 2 nrniv -nobanner -mpi -python -c 'from neuron import h; pc = h.ParallelContext(); h.quit()' 2>&1) - if [[ "$?" -eq "0" ]]; then - echo "ok" - NRNIV_AND_PYTHON_AND_MPI_WORKS=1 - else - echo "failed" - echo "Could not run nrniv with Python and MPI" - echo "the command that failed was:" - echo "$COMMAND" - echo $OUTPUT - return=2 - fi + echo -n "Checking NEURON nrniv funtionality with Python and MPI..." + COMMAND="mpiexec -n 2 nrniv -nobanner -mpi -python -c 'from neuron import h; pc = h.ParallelContext(); h.quit()' 2>&1" + OUTPUT=$(export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib; mpiexec -n 2 nrniv -nobanner -mpi -python -c 'from neuron import h; pc = h.ParallelContext(); h.quit()' 2>&1) + if [[ "$?" -eq "0" ]]; then + echo "ok" + NRNIV_AND_PYTHON_AND_MPI_WORKS=1 + else + echo "failed" + echo "Could not run nrniv with Python and MPI" + echo "the command that failed was:" + echo "$COMMAND" + echo "Tried environment variable LD_LIBRARY_PATH=${CONDA_PREFIX}/lib" + echo "Command output (on a single line):" + echo $OUTPUT + echo + return=2 + fi else - echo "Skipping NEURON funtionality tests with Python and MPI." + echo "Skipping NEURON funtionality tests with Python and MPI." fi diff --git a/installer/mac/check-pre.sh b/installer/mac/check-pre.sh index 1658122a3..fae39557d 100755 --- a/installer/mac/check-pre.sh +++ b/installer/mac/check-pre.sh @@ -91,8 +91,7 @@ if [ -n "$PYTHONPATH" ]; then if [[ "$PYTHONPATH" =~ "NEURON" ]] || [[ "$PYTHONPATH" =~ "NRN" ]]; then echo "warning" echo "NEURON libraries found in PYTHONPATH variable. This was used before " - echo "the 'pip install' method. Make sure this matches the version used to " - echo "compile HNN modules with 'make'" + echo "the 'pip install' method." echo "PYTHONPATH=$PYTHONPATH" echo return=1 diff --git a/installer/ubuntu/README.md b/installer/ubuntu/README.md index 82c4ae3bc..faa83f92a 100644 --- a/installer/ubuntu/README.md +++ b/installer/ubuntu/README.md @@ -1,41 +1,72 @@ -# HNN "Python" install (Ubuntu) +# HNN install (Ubuntu) -The script below assumes that it can update OS packages for python and prerequisites for NHNN. +## Prerequisite: Miniconda + +- Run the commands below from a terminal window (as a regular user). This will create a python environment isolated from other installations on the system. + + ```bash + cd /tmp/ + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + sh ./Miniconda3-latest-Linux-x86_64.sh -b + rm /tmp/Miniconda3-latest-Linux-x86_64.sh + ``` + +## Prepare the Python environment + +1. Create a conda environment with the Python prerequisites for HNN. + + ```bash + conda env create -f environment.yml + ``` + +2. Activate the HNN conda environment and python prerequisite packages + + ```bash + conda activate hnn + pip install hnn-core + pip install nlopt + pip install mpi4py + ``` + +## Download HNN source code ```bash -curl --remote-name https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/ubuntu/hnn-ubuntu.sh -bash hnn-ubuntu.sh +git clone https://github.com/jonescompneurolab/hnn.git +cd hnn ``` -## Start HNN +## Run the HNN model -1. From the command-line, type following commands +1. Start the HNN GUI from a terminal window. Make sure the hnn environment has been activated each time a terminal window is opened: ```bash - cd hnn_source_code - python3 hnn.py + conda activate hnn + python hnn.py ``` 2. The HNN GUI should show up. Make sure that you can run simulations by clicking the 'Run Simulation' button. This will run a simulation with the default configuration. After it completes, graphs should be displayed in the main window. 3. You can now proceed to running the tutorials at [https://hnn.brown.edu/index.php/tutorials/](https://hnn.brown.edu/index.php/tutorials/) . Some things to note: - * A directory called "hnn_out" exists in your home directory in Ubuntu where the results from your simulations (data and param files) will be stored. + - A directory called "hnn_out" exists in your home directory where the results from your simulations (data and param files) will be stored. ## Upgrading to a new version of HNN -HNN Releases can be seen on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). +HNN Releases can be found on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). -To download the latest release, use the following commands within an Ubuntu terminal: +To download the latest HNN release: ```bash curl --remote-name https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz +mkdir hnn_source_code tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code cd hnn_source_code -make +conda activate hnn python3 hnn.py ``` +If you are using `git`, then run `git pull origin master` from the source code directory. + ## Troubleshooting If you run into other issues with the installation, please [open an issue on our GitHub](https://github.com/jonescompneurolab/hnn/issues). Our team monitors these issues and will investigate possible fixes. diff --git a/installer/ubuntu/hnn-ubuntu.sh b/installer/ubuntu/hnn-ubuntu.sh index 46b1bb888..21875eb75 100755 --- a/installer/ubuntu/hnn-ubuntu.sh +++ b/installer/ubuntu/hnn-ubuntu.sh @@ -97,7 +97,7 @@ fi echo "Installing OS compilation toolchain..." | tee -a "$LOGFILE" # get prerequisites from pip. requires gcc to build psutil sudo -E apt-get install --no-install-recommends -y \ - make gcc g++ python3-dev &> "$LOGFILE" + gcc g++ python3-dev &> "$LOGFILE" if [[ "$USE_CONDA" -eq 0 ]]; then echo "Waiting for python packages for HNN downloads to finish..." @@ -126,9 +126,6 @@ else # create conda environment conda env create -f environment.yml - # conda is faster to install nlopt - conda install -y -n hnn -c conda-forge nlopt - source activate hnn && echo "activated conda HNN environment" echo "Installing MPI compilation toolchain..." | tee -a "$LOGFILE" @@ -137,7 +134,7 @@ else libopenmpi-dev &> "$LOGFILE" # install hnn-core and prerequisites (e.g. NEURON) - pip install mpi4py pyqt5 hnn-core + pip install hnn-core mpi4py nlopt fi echo "Downloading runtime prerequisite packages..." | tee -a "$LOGFILE" diff --git a/installer/windows/native_install.md b/installer/windows/native_install.md index 609a8b167..a6213c75e 100644 --- a/installer/windows/native_install.md +++ b/installer/windows/native_install.md @@ -24,13 +24,13 @@ The PowerShell script used below will create a new directory called "hnn" in the OR to download and run the script from a url: ```powershell - @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/windows/hnn-windows.ps1'))" + @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/windows/hnn-windows.ps1'))" ``` OR from a powershell prompt: ```powershell - Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/windows/hnn-windows.ps1')) + Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/windows/hnn-windows.ps1')) ``` - There will be a permission prompt to install Microsoft MPI and a couple of terminal windows will diff --git a/installer/windows/wsl.md b/installer/windows/wsl.md index c0edb4825..81a598dd0 100644 --- a/installer/windows/wsl.md +++ b/installer/windows/wsl.md @@ -28,7 +28,7 @@ Some notes: Launch the Ubuntu application to open a command line and run the commands below to download and run a script that will install HNN and its prerequisites. ```bash -curl --remote-name https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/ubuntu/hnn-ubuntu.sh +curl --remote-name https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/ubuntu/hnn-ubuntu.sh bash hnn-ubuntu.sh ``` @@ -67,15 +67,15 @@ You will need to **restart Ubuntu** after this. Until you do so, simulations wil ## Upgrading to a new version of HNN -HNN Releases can be seen on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). +HNN Releases can be found on the [GitHub releases page](https://github.com/jonescompneurolab/hnn/releases/). You can also be notified of new releases by watching the hnn [repository on GitHub](https://github.com/jonescompneurolab/hnn/). -To download the latest release, use the following commands within an Ubuntu terminal: +To download the latest HNN release, use the following commands within an Ubuntu terminal: ```bash wget -O hnn.tar.gz https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz +mkdir hnn_source_code tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code cd hnn_source_code -make python3 hnn.py ``` diff --git a/scripts/setup-travis-osx.sh b/scripts/setup-travis-osx.sh index fc3b123b5..b4cd4bb12 100755 --- a/scripts/setup-travis-osx.sh +++ b/scripts/setup-travis-osx.sh @@ -17,8 +17,6 @@ source "$HOME/Miniconda3/etc/profile.d/conda.sh" # create conda environment conda env create -f environment.yml conda install -y -n hnn openmpi mpi4py -# conda is faster to install nlopt -conda install -y -n hnn -c conda-forge nlopt conda activate hnn -pip install hnn-core pyqt5 \ No newline at end of file +pip install hnn-core nlopt \ No newline at end of file From 8ce35901846ee6c1a0eb3df9adda83e53ca97720 Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Sun, 21 Mar 2021 08:27:08 -0400 Subject: [PATCH 3/5] DOC: misc fixes --- installer/mac/README.md | 10 ++-------- installer/ubuntu/README.md | 2 +- installer/windows/wsl.md | 28 ++-------------------------- 3 files changed, 5 insertions(+), 35 deletions(-) diff --git a/installer/mac/README.md b/installer/mac/README.md index 653aa6238..fb8863e17 100644 --- a/installer/mac/README.md +++ b/installer/mac/README.md @@ -25,9 +25,7 @@ The Xcode Command Line Tools package includes utilities for compiling code from - If you get the following error, you can skip this step. `xcode-select: error: command line tools are already installed, use "Software Update" to install updates` -2. Then press `Install` in the pop-up dialog - - +2. Then press `Install` in the pop-up dialog. ## Prerequisite 2: Miniconda (Python 3) @@ -82,11 +80,7 @@ cd hnn 2. The HNN GUI should show up. Make sure that you can run simulations by clicking the 'Run Simulation' button. This will run a simulation with the default configuration. After it completes, graphs should be displayed in the main window. -3. When you run simulations for the first time, the following dialog boxes may pop-up and ask you for permission to allow connections through the firewall. Saying 'Deny' is fine since simulations will just run locally on your Mac. - - - - +3. When you run simulations for the first time, two dialog boxes may pop-up and ask you for permission to allow connections through the firewall. Saying 'Deny' is fine since simulations will just run locally on your Mac. 4. You can now proceed to running the tutorials at [https://hnn.brown.edu/index.php/tutorials/](https://hnn.brown.edu/index.php/tutorials/) . Some things to note: diff --git a/installer/ubuntu/README.md b/installer/ubuntu/README.md index faa83f92a..611942c1a 100644 --- a/installer/ubuntu/README.md +++ b/installer/ubuntu/README.md @@ -73,4 +73,4 @@ If you run into other issues with the installation, please [open an issue on our Another option for users that are running into problems with the above methods, we provide a VirtualBox VM pre-installed with HNN. -* [Virtualbox install instructions](../virtualbox/README.md) +- [Virtualbox install instructions](../virtualbox/README.md) diff --git a/installer/windows/wsl.md b/installer/windows/wsl.md index 81a598dd0..e3b357cf0 100644 --- a/installer/windows/wsl.md +++ b/installer/windows/wsl.md @@ -4,7 +4,7 @@ Below is Microsoft's guide for installing WSL. Note that both WSL 1 and WSL 2 will work with, but **WSL1 is recommended** because the DISPLAY variable will need to be adjusted with WSL 2. -https://docs.microsoft.com/en-us/windows/wsl/install-win10 +[https://docs.microsoft.com/en-us/windows/wsl/install-win10](https://docs.microsoft.com/en-us/windows/wsl/install-win10) Some notes: @@ -35,7 +35,7 @@ bash hnn-ubuntu.sh Some notes: * You'll be asked for the password you created in WSL (above) -* While it gets tested frequently as part of our automated builds, please let us know if you run into a failure by creating a GitHub issue](https://github.com/jonescompneurolab/hnn/issues). +* While it gets tested frequently as part of our automated builds, please let us know if you run into a failure by [creating a GitHub issue](https://github.com/jonescompneurolab/hnn/issues). You will need to **restart Ubuntu** after this. Until you do so, simulations will fail to run from HNN. @@ -85,28 +85,4 @@ If you still want to use WSL, you can just remove the hnn source code directory ## Troubleshooting -### VcXsrv - -Make sure VcXsrv has been updated to at least 1.20.60. Earlier versions can cause the errors below: - -`hnn_docker.sh` would fail: - -```bash -Starting VcXsrv... done -Checking for xauth... found -Checking for X11 authentication keys... *failed* -``` - -`hnn_docker.log` contains: - -```bash -Retrieving host xauth keys... - - ** Command: /c/Program Files/VcXsrv/xauth.exe -f /c/Users/user/.Xauthority -ni nlist localhost:0 - ** Stderr: C:\Program Files\VcXsrv\xauth.exe: (argv):1: bad display name "localhost:0" in "nlist" command -*failed* -``` - -### Other - If you run into other issues with the installation, please [open an issue on our GitHub](https://github.com/jonescompneurolab/hnn/issues). Our team monitors these issues and will be able to suggest possible fixes. From 6925d27254bd6e2e8bb740457b0ce2cfc7087d5e Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Tue, 30 Mar 2021 12:11:13 -0400 Subject: [PATCH 4/5] DOC: have users install hnn-core master branch --- installer/centos/hnn-centos6.sh | 2 +- installer/docker/Dockerfile | 2 +- installer/mac/README.md | 2 +- installer/ubuntu/README.md | 2 +- installer/ubuntu/hnn-ubuntu.sh | 4 ++-- scripts/setup-travis-osx.sh | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/installer/centos/hnn-centos6.sh b/installer/centos/hnn-centos6.sh index 16ad5867d..034c5b490 100644 --- a/installer/centos/hnn-centos6.sh +++ b/installer/centos/hnn-centos6.sh @@ -16,7 +16,7 @@ sudo yum -y install python34-setuptools sudo easy_install-3.4 pip pip3 install --upgrade matplotlib --user pip3 install --upgrade nlopt scipy --user -pip3 install hnn-core +pip3 install https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master sudo yum -y install ncurses-devel sudo yum -y install openmpi openmpi-devel sudo yum -y install libXext libXext-devel diff --git a/installer/docker/Dockerfile b/installer/docker/Dockerfile index f417f381e..a3552ec3d 100644 --- a/installer/docker/Dockerfile +++ b/installer/docker/Dockerfile @@ -84,7 +84,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.schema-version=$VCS_TAG # install hnn-core -RUN sudo pip install hnn-core +RUN sudo pip install https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master # install HNN RUN sudo apt-get update && \ diff --git a/installer/mac/README.md b/installer/mac/README.md index fb8863e17..24611e74a 100644 --- a/installer/mac/README.md +++ b/installer/mac/README.md @@ -51,7 +51,7 @@ The Xcode Command Line Tools package includes utilities for compiling code from ```bash conda activate hnn - pip install hnn-core + pip install https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master pip install nlopt pip install mpi4py ``` diff --git a/installer/ubuntu/README.md b/installer/ubuntu/README.md index 611942c1a..d3a38ce61 100644 --- a/installer/ubuntu/README.md +++ b/installer/ubuntu/README.md @@ -23,7 +23,7 @@ ```bash conda activate hnn - pip install hnn-core + pip install https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master pip install nlopt pip install mpi4py ``` diff --git a/installer/ubuntu/hnn-ubuntu.sh b/installer/ubuntu/hnn-ubuntu.sh index 21875eb75..151f23a87 100755 --- a/installer/ubuntu/hnn-ubuntu.sh +++ b/installer/ubuntu/hnn-ubuntu.sh @@ -106,7 +106,7 @@ if [[ "$USE_CONDA" -eq 0 ]]; then # install hnn-core and prerequisites (e.g. NEURON) echo "Installing python prequisites for HNN with pip..." | tee -a "$LOGFILE" - $PIP install --no-cache-dir pyqt5 nlopt psutil hnn-core &> "$LOGFILE" + $PIP install --no-cache-dir pyqt5 nlopt psutil https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master &> "$LOGFILE" # WSL may not have nrnivmodl in PATH if ! which nrnivmodl &> /dev/null; then @@ -134,7 +134,7 @@ else libopenmpi-dev &> "$LOGFILE" # install hnn-core and prerequisites (e.g. NEURON) - pip install hnn-core mpi4py nlopt + pip install https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master mpi4py nlopt fi echo "Downloading runtime prerequisite packages..." | tee -a "$LOGFILE" diff --git a/scripts/setup-travis-osx.sh b/scripts/setup-travis-osx.sh index b4cd4bb12..92b1b3226 100755 --- a/scripts/setup-travis-osx.sh +++ b/scripts/setup-travis-osx.sh @@ -19,4 +19,4 @@ conda env create -f environment.yml conda install -y -n hnn openmpi mpi4py conda activate hnn -pip install hnn-core nlopt \ No newline at end of file +pip install https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master nlopt \ No newline at end of file From 5bcd3909354dc60a6643b3df0b960c1326c14d16 Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Tue, 30 Mar 2021 12:12:46 -0400 Subject: [PATCH 5/5] DOC: switch to installation scripts on master --- installer/mac/README.md | 4 ++-- installer/windows/native_install.md | 4 ++-- installer/windows/wsl.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/installer/mac/README.md b/installer/mac/README.md index 24611e74a..6e73c8aac 100644 --- a/installer/mac/README.md +++ b/installer/mac/README.md @@ -9,7 +9,7 @@ - The command below will run a script to check for existing installations of prerequisites. If a compatible version is installed, it will say which steps can be skipped below. ```bash - curl -s "https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/mac/check-pre.sh" | bash + curl -s "https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/mac/check-pre.sh" | bash ``` ## Prerequisite 1: Xcode Command Line Tools @@ -59,7 +59,7 @@ The Xcode Command Line Tools package includes utilities for compiling code from ## Run post-install checks ```bash -curl -s "https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/mac/check-post.sh" | bash +curl -s "https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/mac/check-post.sh" | bash ``` ## Download HNN source code diff --git a/installer/windows/native_install.md b/installer/windows/native_install.md index a6213c75e..609a8b167 100644 --- a/installer/windows/native_install.md +++ b/installer/windows/native_install.md @@ -24,13 +24,13 @@ The PowerShell script used below will create a new directory called "hnn" in the OR to download and run the script from a url: ```powershell - @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/windows/hnn-windows.ps1'))" + @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/windows/hnn-windows.ps1'))" ``` OR from a powershell prompt: ```powershell - Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/windows/hnn-windows.ps1')) + Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/windows/hnn-windows.ps1')) ``` - There will be a permission prompt to install Microsoft MPI and a couple of terminal windows will diff --git a/installer/windows/wsl.md b/installer/windows/wsl.md index e3b357cf0..02ce88d37 100644 --- a/installer/windows/wsl.md +++ b/installer/windows/wsl.md @@ -28,7 +28,7 @@ Some notes: Launch the Ubuntu application to open a command line and run the commands below to download and run a script that will install HNN and its prerequisites. ```bash -curl --remote-name https://raw.githubusercontent.com/blakecaldwell/hnn/integration_docs/installer/ubuntu/hnn-ubuntu.sh +curl --remote-name https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/ubuntu/hnn-ubuntu.sh bash hnn-ubuntu.sh ```