-
Notifications
You must be signed in to change notification settings - Fork 22
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
Test installation of jNeuroML toolchain from source on Bash for Windows #45
Comments
The Windows Subsystem for Linux that can be activated after the Anniversary Update of Windows 10 has been installed allows a full version of Ubuntu 14.04 (16.04 will be featured after the Spring update) to be added and run from a command prompt. X windows is not supported from the Bash prompt, however installing Cygwin/x (xorg-server, xinit, xhost, kde-workspace, xfonts-100dpi, xfonts-75dpi) natively on windows allows communication with the Bash terminal if the following command is entered into the Cygwin xterminal: $ xinit startkde -- -listen tcp The -listen tcp is important as it allows bash on windows to talk to it. In the Bash on Windows session the following command completes the link: $ export DISPLAY=:0.0 Now running myLEMSfile_nrn.py with nrngui works perfectly: sudo apt-get install works as normal to install most applications. For the moment java only works if using the "-xint" option (this can be done from the .bashrc file with an export message). This bug has been fixed for insider builds and the bug fix will come to regular users in the Spring 2017 update. So now, I have pyNeuron, nrngui, nrnivmodl and pyNeuroML all working in Bash for Windows. But I am still working on installing jNeuroML the sticking point is that it requires a Maven install and the process runs until mvn is invoked and maven fails to start. I will report back with further details Maven issue soon. |
Thanks for the update on this @Simon-at-Ely |
Your welcome @pgleeson here is the 2nd installment of the problem I having doing the Maven install of jNeuroML. To start with here is the stuff I have added to my .bashrc file: added by Simonexport NEURON_HOME=/home/Simon/neuron/nrn/x86_64 added by Anaconda2 4.1.1 installerexport PATH="/home/Simon/anaconda2/bin:$PATH" Next checking that I have succeeded in installing Maven: Simon@DESKTOP-GMI3HL5:~$ mvn -v Now what happens when I try to install jNeuroML: Simon@DESKTOP-GMI3HL5: ------ Updating: LEMS/jLEMS -------
------ Updating: LEMS/LEMS -------
------ Updating: LEMS/pylems -------
------ Updating: NeuroML/NeuroML2 -------
------ Updating: NeuralEnsemble/libNeuroML -------
------ Updating: NeuroML/org.neuroml.model.injectingplugin -------
------ Updating: NeuroML/org.neuroml.model -------
I found a thread for Maven not working on Microsoft's BashOnWindows Github Issues here: I currently have Build 14393. Build 14901 that is reported has Maven working in the link above is an insider build, so it looks like I will have to wait until the Spring 2017 update to have this working. Unless they decide to issue some bug fixes to the wider community before the full update. |
Yesterday I manually updated to Windows 10 Build 15063.13 (the Creator Edition) This was after being tipped off by ArsTechnica that an update tool was now available here: https://www.microsoft.com/en-gb/software-download/windows10?tduid=(9266948c4684727c0ed5fed807fb2bd0)(266696)(1503186)(100796X1556580Xc73af4688b531cee7dd5de8235f0665c)(). I then was able to update from Ubuntu 14.04 to Ubuntu 16.04 using "sudo do-release-upgrade". Maven install of jNeuroML. As before running python getNeuroML.py runs through the git pull steps, then crashes with error 1 when mvn is invoked. So next I tried invoking a maven install manually with "mvn clean install" this started OK with: [INFO] Building jNeuroML 0.7.7 and proceeded to make a series of downloads for example: Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom (6 KB at 101.7 KB/sec) There were about 20 of these then it started trying to download some NeuroML specific items which failed and aborted maven: Downloading: https://repo.maven.apache.org/maven2/org/neuroml1/model/org.neuroml1.model/1.4.6/org.neuroml1.model-1.4.6.pom I am not sure why it is looking for the NeuroML specific code on the apache maven repository? Is this code normally held there? I did not have this problem when I recently updated a Fedora install of jNeuroML using the same wifi router so the problem seems to be specific to the BASH on Windows installation. Could it be something to do with Windows Defender blocking something? Any ideas @pgleeson ? |
Installation of neuroConstruct Installation of neuroConstruct went smoothly. I cloned from the GitHub repository with: git clone https://github.com/NeuralEnsemble/neuroConstruct.git I then needed to install subversion with: sudo apt-get install subversion to run ./updatenC.sh (cd neuroConstruct to run the update) then 'ant' resulted in a successful build. I then cloned my AOB mitral cell model: Next step was to generate Neuron code for the model within neuroConstruct but this produced an error that was fairly simple to sort out: |
Figured out how to get a command line executable to launch when the run simulation button is clicked for the generated code on neuroConstruct. I needed to install the kubuntu desktop on top of Ubuntu 16.04. This is a large installation that takes some time and there is lots of stuff that I do not need like Libre Office and Amrok. Maybe there is a more basic setup that it is possible to install. But this is how I managed the installation: sudo add-apt-repository ppa:kubuntu-ppa/backports I also edited my .bashrc file to include: export DISPLAY=:0.0 I then fired up neuroConstruct changed settings > General Settings and Project Default Settings > Command line: back to the original 'konsole' so now when I generated the Neuron code for my model it worked as expected and displayed in the Cygwin window: So now I just need to figure out how to get Maven to see the NeuroML repositories and I will have the full set of tools working on BASH on Windows. |
@Simon-at-Ely Glad to see you got nC running this way. Installing the kubuntu desktop was an option, but it was probably the nuclear option... An easier solution (which is what the warning GUI recommended for Ubuntu desktops) was to change to gnome-terminal in nC settings which is the default terminal on Ubuntu... Regarding the install of jNeuroML, the org.neuroml.import-1.4.6.jar etc. can't be downloaded from online maven repositories (live most mavenised packages), they need to be built from the latest development sources. In jNeuroML try:
If that fails, you're best going to each of the nml2 repos in turn and typing 'mvn clean install' until you see what the problem is: ../jLEMS |
@pgleeson Thanks for your thoughts... I did try setting gnome-terminal in nC along with quite a few other things, but it seems that within BASH on Windows there is no desktop environment installed as a default. This is because it is strictly command line as x-windows is not implemented. I was able to bypass this by installing Cygwin x on Windows and getting it to listen to what I was doing in the BASH terminal. It may have been simpler to find a way to spawn a new BASH terminal to handle running Neuron but I did not manage to find a way to do this. So I opted for the more cumbersome kubuntu desktop in preference to gnome-unity as I have been using KDE for years; first in SUSE then going for the KDE spin of Fedora as I did not feel at home with the Gnome default. Neither was installed so it was my choice which to install on the BASH on Windows version of Ubuntu. I will give your suggestions a go for jNeuroML over the next day or two and report back with how I get on. |
@pgleeson the first command 'git checkout development' executed successfully and 2nd 'python getNeuroML.py clean' partially completed but then generated an error (see below). The 3rd python getNeuroML.py development gave plenty of warnings about unused attributes but then reported a successful build in the end. I will try to validate some channels with it to see if it works and report back. Simon@DESKTOP-GMI3HL5:
|
Well I wasn't expecting that! I had also tried installing jNeuroML natively on Windows as well as on BASH on windows and now in the latest build of Windows 10 the two sides can communicate with each other. So when I tried validating a file with jnml this was the result: Simon@DESKTOP-GMI3HL5: I guess I need to put a path in the .bashrc file so that it finds the right version of jnml. |
Put a path for JNML_HOME in .bashrc but it still finds the one on the windows side even though the one on the BASH side is now showing up: However putting an explicit path in the command finds the right one and jnml successfully carried out the validation test on the files: Simon@DESKTOP-GMI3HL5:~/NML2_Test/AOB_mitral_cell$ /home/Simon/neuroml_dev/jNeuroML/jnml -validate *.nml Validating: /home/Simon/NML2_Test/AOB_mitral_cell/Vm_iMC1_cell_1_origin.sim.nml Validated 13 files: 12 passed, 1 failed So it looks like I am there, it is possible to install and run all the NeuroML tools on BASH on Windows. Probably some minor adjustments needed to smooth some hiccups out. But at least I have shown that it is now possible. |
Thanks again for testing this @Simon-at-Ely. Glad to see it can work if required, but as mentioned my advice would always be to either get the toolchain working natively on Windows or (preferably) install a dual boot with Ubuntu... |
I did try for sometime to get the toolchain to work natively on Windows and then switched to BASH on Windows as I could get more of it working. From memory one of the sticking points was the python version of Neuron that is available for Windows is really cut down and lacks all the gui elements. But generally getting all the dependencies installed is much easier on Ubuntu than Windows. I ran my laptop as dual boot for about 5 years but continuously rebooting is a pain especially if files need to be saved to a flash drive to transfer from one side to the other. Admittedly things have got easier on this score with Dropbox and Github. However in presentations it is nice to show off neuroConstruct especially when talking to people that haven't seen it. But then to swap backwards and forwards with a PowerPoint presentation is difficult in Ubuntu as in my experience Wine does not work that well. I also use Excel quite a bit in conjunction with python. Excel is a real pain when used with Wine. If you open two Excel workbooks at once it becomes really unstable and even with just one workbook open simple things like editing the scale on a graph causes a crash. The latter is not so much of a problem as I can do all my plotting in python. But it would be so much easier if I could accomplish all my work without resorting to dual boot. I am now at the point where I am ready to buy a new laptop so deciding what OS to go with is the first decision that needs to be made. I was experimenting with my current windows laptop and linux desktop try to clarify the suitability of the various options. If Windows were to implement x-windows in their Windows Subsystem for Linux it would make the choice simple. That is not the case at the moment and I cannot be sure that it ever will be the case. An even more unlikely scenario would be that they produce a fully Linux compatible release of Windows so that I could achieve everything I want on Ubuntu (I have tried LibreOffice and its compatibility and capabilities do not meet my requirements). I guess I could look a bit further at the native install of the tool chain on Windows but I did get the impression that it wasn't currently an option when I looked at it in 2016. The final option was that I try with Apple OSX, but I seem to remember that I was advised there was problems with that route also and I would have to learn a new OS from scratch as I have never used it. Apple users say that it is intuitive, but with 30 years of ms-dos/windows and 10 years of Linux experience it may not be quite so intuitive. |
See https://msdn.microsoft.com/en-gb/commandline/wsl/about
@Simon-at-Ely has been testing this out
The text was updated successfully, but these errors were encountered: