From e5ba626ac92cd0491f7080e2c3f6e8d6da4fdbbc Mon Sep 17 00:00:00 2001 From: Nicholas Tolley Date: Fri, 19 Apr 2024 13:33:16 -0400 Subject: [PATCH 1/2] WIP start install files --- install/windows_install.md | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 install/windows_install.md diff --git a/install/windows_install.md b/install/windows_install.md new file mode 100644 index 0000000..a274790 --- /dev/null +++ b/install/windows_install.md @@ -0,0 +1,52 @@ +## Prerequisites for Windows + +- Github Account + +- Docker, recommended docker desktop https://www.docker.com/products/docker-desktop/ + No need to create an account + +- Visual Studio Code (recommended to run WSL) + +- WSL (Windows Subsystem for Linux) https://learn.microsoft.com/en-us/windows/wsl/install + + Open PowerShell or Windows Command Prompt in administrator mode by right clicking and selecting “Run as administrator”, then run the command “wsl —install” + +- VcXsrv (x-server for Windows) + https://sourceforge.net/projects/vcxsrv/ + +- Once downloaded, need to configure to allow connections https://sourceforge.net/p/vcxsrv/wiki/VcXsrv%20%26%20Win10/ + + Just follow instructions under step 1 to create magiccookie key inside the .Xauthority file + + +## Windows Installation Process + +### Part 1 + +1) Open command Prompt + +2) Run the following command to install Windows Subsystem for Linux (WSL) + + wsl --install + +![alt text](image.png) + + +### Starting up HNN application for Windows +- Make sure, you have Docker up and running. Recommend installing Docker through the Docker Desktop so you can an interface to check that it is running. + +- Install required packages including VcXsrv and WSL + Follow original instructions to set up VcXsv server (disable access control step) + +- Make sure to follow additional instructions to create maggiccookie key inside .Xauthority file. + +- Navigate to hnn folder, and run ./hnn_docker.sh start to start the script, which should start up the GUI + + +### TO-DO make these more clear: +A couple of notes here: + +- Weirdly "~/.Xauthority" "\${userprofile}/." did not work for me - I had to specify the path to .Xauthority directly (cp "/home/dylansdaniels/.Xauthority" "\${userprofile}/.") +The first time I did this, I mis-specified the IP address, missing the ":0" at the end of "DISPLAY=NN.NN.NN.NN:0" in part 3 -> we might want to highlight that more, as I feel like it's an easy thing to miss +the instructions in update-pre-hnn-core reference the configure_vcxsrv.sh file. However, the instructions also have you clone / work from the master branch, which doesn't have that file so far as I can tell? + From 18657aa0cdbc4d32f45cc9614f814c389ef9db8d Mon Sep 17 00:00:00 2001 From: Nicholas Tolley Date: Tue, 23 Apr 2024 16:01:44 -0400 Subject: [PATCH 2/2] Add mac file --- install/mac_install.md | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 install/mac_install.md diff --git a/install/mac_install.md b/install/mac_install.md new file mode 100644 index 0000000..3b383d8 --- /dev/null +++ b/install/mac_install.md @@ -0,0 +1,73 @@ +# Installing HNN docker on macOS (Sonoma 14.4.1) + +## Pre-requisites + +### 1) GitHub Account + +Set up a github account following the instructions on the website. [https://docs.github.com/en/get-started/start-your-journey/creating-an-account-on-github +](url) + +Once set-up, check if git is installed on your Mac: + +1. Open terminal/command line interface (CLI; command + space and type in "terminal") +2. In the terminal, execute ```git version```. If the output looks something this, continue to pre-requisite **2) Docker desktop.** +``` +Last login: Mon Apr 22 11:17:56 on ttys000 +(base) katharinaduecker@Katharinas-MacBook-Pro ~ % git version +git version 2.44.0 + +``` +3. If git is an unknown command, install the latest version of git. If you have python and homebrew installed on your mac, run the following command in the terminal. * +``` +brew install git +``` +If homebrew is not installed on your mac, run +```pip install brew``` first. + + +Alternatively, you can follow the instructions here to download the most recent installer +[https://github.com/git-guides/install-git +](url) + +4. Set your github username and email adress, be executing +``` +git config --global user.name "YOUR USERNAME" +git config --global user.email "YOUR EMAIL" +``` + +5. Repeat step 1. and 2. to double-check if git is installed correctly. + +For more helpful tips and suggestions on how to set up git, see: [https://git-scm.com/book/en/v2/Getting-Started-Installing-Git](url) + +### 2) Docker desktop + +Simply follow the instructions on the website to install Docker desktop. [https://www.docker.com/products/docker-desktop/](url) + +You don't need to create an account. + +### 3) Xquartz + +Download the installer from [https://www.xquartz.org/](url) + +Once downloaded, open up Settings > Security, and press the checkmark for “Allow connections from network clients” to allow connection for the HNN-GUI. + +## Cloning the HNN repository + +1. Open the terminal/CLI (command + space and type "terminal") if you haven't already. +2. Navigate to the directory where you want to clone the repository using ```cd "directory"``` +3. Execute ``` git clone https://github.com/jonescompneurolab/hnn ``` + +## Start HNN-GUI +Once you have completed all of the above, you will only need execute the following steps everytime you want to start the HNN-GUI. +- Make sure Docker desktop is runinng +[perhaps insert docker screenshot here] +- Open the terminal/CLI if you haven't already. +- Navigate to the folder where you have cloned the HNN repository +- Enter the HNN folder using ```cd hnn``` +- Start the GUI using ```./hnn_docker.sh start``` + +[insert screenshot HNN] + +**Troubleshooting** +If you receive an error, try running ```./hnn_docker.sh uninstall``` first before running ```./hnn_docker.sh start``` +(This could happen if you're trying to run an old version of HNN). \ No newline at end of file