Data Science workgroup: Difference between revisions

imported>Costrouc
Adding jupyterlab instructions with nix-shell
DoggoBit (talk | contribs)
No edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{delete|reason=This workgroup may no longer be active. Last substantial page edit before import.}}{{outdated|Other than site-wide fixes, this page has not seen recent updates.}}
This workgroup is dedicated towards improving the state of the data science stack in Nixpkgs. This includes work on packages and modules for scientific computation, artificial intelligence and data processing, as well as data science IDEs.
This workgroup is dedicated towards improving the state of the data science stack in Nixpkgs. This includes work on packages and modules for scientific computation, artificial intelligence and data processing, as well as data science IDEs.


=== JupyterLab ===
=== JupyterLab ===
The [https://github.com/tweag/jupyterWith JupyterWith] repo "provides a Nix-based framework for the definition of declarative and reproducible Jupyter environments. These environments include JupyterLab - configurable with extensions - the classic notebook, and configurable Jupyter kernels."


Work has been done to easily deploy arbitrary kernels and jupyter extensions with nix. There are some limitations due to jupyterlab extensions relying heavily on npm and webpack to compile the javascript modules. Thus an unpure setup is easiest to get it working. The following `default.nix` shell will install 20 jupyerlab extension + 4 kernels (c, python, go, and ansible). All that needs to be edited by user is kernels, additionalExtensions, and buildInputs. The rest is automatic and will launch a jupyterlab instance for you.
Alternatively, [https://github.com/NixOS/nixpkgs/pull/49807 there is an unmerged pull request] with work to easily deploy arbitrary kernels and jupyter extensions with nix. There are some limitations due to jupyterlab extensions relying heavily on npm and webpack to compile the javascript modules. Thus an unpure setup was considered easiest to get it working. If the pull request were merged, the following `default.nix` shell would install 20 jupyerlab extension + 4 kernels (c, python, go, and ansible). All that would need to be edited by user would be kernels, additionalExtensions, and buildInputs. The rest would be automatic and would launch a jupyterlab instance for you.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 59: Line 59:


# labextensions
# labextensions
${pkgs.stdenv.lib.concatMapStrings
${pkgs.lib.concatMapStrings
     (s: "jupyter labextension install --no-build --app-dir=$TEMPDIR ${s}; ")
     (s: "jupyter labextension install --no-build --app-dir=$TEMPDIR ${s}; ")
     (pkgs.lib.unique
     (pkgs.lib.unique
Line 88: Line 88:




with such highlights as @aborsu's [https://github.com/aborsu/nixpkgs/blob/22ef965da38cc5e3457fe2d848b8a789cb6ad207/nixos/modules/services/development/jupyter/default.nix Jupyter kernels written in Nix]:
with such highlights as [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix Jupyter kernels written in Nix]:


{{file|./modules/datasci.nix|nix|<nowiki>
{{file|./modules/datasci.nix|nix|<nowiki>
Line 126: Line 126:
== Channels ==
== Channels ==


[irc://irc.freenode.net/nixos-data ''#nixos-data'' on Freenode]
[https://matrix.to/#/#datascience:nixos.org #datascience:nixos.org on Matrix]


== People ==
== People ==


[[User:Ixxie|Ixxie]]
[[User:Ixxie|Ixxie]]