I have set up Jupyterhub, and installed anaconda and created a jupyterhub kernel on my user's home directory, in :
~/.local/share/jupyter/kernels/
How can I share this kernel accross all the users in my organisation ?
Of what I understand, jupyterhub spawn a new ipython notebook for each user, each notebook being on the user's home directory.
Should I really copy-paste the kernels into each of my team member in their home directory ?
Or can we have a central point of declaration for the kernels. If so, how to do it ?
PS : We have an ldap server for login.
In the installation of Jupyterhub, it creates a global directory that all users look at. It's typically /usr/local/share/jupyter, but to double check that you can run the command jupyter --paths and it will print all of the paths it uses. You'll want the data one.
There's should be a 'kernels' dir. If there's not then make one. I can't remember off the top of my head, but jupyter kernelspec install /path/to/kernel/source might create the directory for you. Regardless, in the kernels directory of your global jupyter directory, there should be a directory for each kernel you want to install, and within that, the .json file of the kernel. Hope this helps!
Related
I updated to the version here where it installs it per user instead of all.
How do I install for all users instead? Do I need to install for each user now?
Look for the system installer instead of the user setup installer. The system installer will give you the option to:
1. Install for all users
2. Choose a directory.
Download here (oficial page): https://code.visualstudio.com/download
Can't find it? The system installer is below the big blue button to download. You'll see 3 options. The middle option will say system installer.
Applications that are global are stored in /Applications directory as opposed user specific installation that are installed under Applications under the user home directory. So moving the installed folder to /Applications directory might work.
Where is Jupyter notebook data saved?
Is data made viewable to the public when you install Jupyter notebook, how does the token work? Where does the notebook go when you uninstall Anaconda?
Your code is saved locally on your PC, it is not shared to public nor removed upon uninstalling anconda from your PC.
simply you can locate your code by typing in you jupyter notebook pwd which stands for print working directroy.
According to the Jupyter handbook - Common Directories and File Locations the data:
Jupyter uses a search path to find installable data files, such as
kernelspecs and notebook extensions. When searching for a resource,
the code will search the search path starting at the first directory
until it finds where the resource is contained.
Each category of file is in a subdirectory of each directory of the
search path. For example, kernel specs are in kernels subdirectories.
I think you are also interested in the Runtime files:
Things like connection files, which are only useful for the lifetime
of a particular process, have a runtime directory.
On Linux and other free desktop platforms, these runtime files are
stored in $XDG_RUNTIME_DIR/jupyter by default. On other platforms,
it’s a runtime/ subdirectory of the user’s data directory (second row
of the table above).
An environment variable may also be used to set the runtime directory.
I would like to create a vagrant with some utilities installed, such like a configured LAMP, npm installed, etc... and later doing a push in a public github account.
I should create a .gitignore file with which restrictions? A simple vagrant project have this structure:
.vagrant (folder).
html (folder).
vagrantfile (file).
And I don't want some script shell for install the utilities when the user run vagrant up. For that I want to share an environment with everything and installed via vagrant ssh.
You definitely want your Vagrantfile. That's what defines your Vagrant environment. And you almost certainly want to ignore .vagrant/.
gitignore.io seems to agree:
# Created by https://www.gitignore.io/api/vagrant
### Vagrant ###
.vagrant/
You might also want to use this utility with the rest of your stack, e.g. here is a .gitignore generated for Composer, NodeJS and Vagrant.
Not able to install plugin its showing the below error...
C:\devbox>vagrant plugin install 'vagrant-hostmanager'
The directory where plugins are installed (the Vagrant home directory)
has a space in it. On Windows, there is a bug in Ruby when compiling
plugins into directories with spaces. Please move your Vagrant home
directory to a path without spaces and try again.
Ruby (language used by Vagrant) has "issues" with directory names that contain spaces.
Vagrant will use an environment variable (supplied by windows) to tell it where your user directory is (so it can decide where to put your "home" directory). But you might have a space in your user name (I do) which causes a problem for ruby (which is doing the work to install the plugin).
The solution is to move your project to a project directory you choose that doesn't have any spaces in the directory name. Then, use an environment variable called VAGRANT_HOME and set it to a specified directory. The plugin installation procedure will check for the existence of this variable and use it if it exists instead of locating a home directory within the windows current user directory.
I created a folder called home within C:\Hashicorp\Vagrant and used that (C:\Hashicorp\Vagrant\home).
Setting windows environment variables is not hard (rather trivial actually) - you can find out how here: http://www.computerhope.com/issues/ch000549.htm
You'll have to do a restart to your system for it to take effect (it all worked after a reboot for me).
I've found a slight variation to the #Reinsbrains answer. In order to have a home directory without spaces within its name. I created a junction to my user/home directory. In my case I decided to go with a Linux style structure, but any location would work. In an admin command prompt:
mkdir c:\home
mklink /j c:\home\maarten "c:\users\Maarten Bicknese"
Next set the VAGRANT_HOME environment variable to the newly created junction.
setx VAGRANT_HOME c:\home\maarten
Fire up a new command prompt and you're good to go!
I'm brand new to python, using terminal, pip and virtual env.
From what I gather, the command 'source' activates the virtual environment and anything you do after that stays in the virtual environment like installing something with pip installs it only in your virtual environment. However, do I need to actually create a folder or choose a location first before I run source? In other words, does source create the virtual environment or only activate one that already exists?
This stuff is really hard to wrap my head around. I think one of the things that is hindering my development is that I'm not familiar with certain directory structures like bin, ect.
Once you create a virtualenv, you will see source created in the directory.
You must cd to that particular source and do source activate to start working on that particular virtualenv. Each virtualenv has its own source.
You can also use virtualenv wrapper to make things easier.
Look, you need to create the virtual enviroment first, with something like this:
virtualenv venv
Where 'venv' is the destination directory. After that you can run:
source venv/bin/activate
You can take a look at virtualenv help with:
virtualenv --help