Nix flake packaging scanpy and jupyter notebook server.
- Install nix (if not yet installed)
- Enable nix flakes (if not already)
mkdir -p ~/.config/nix echo -e "experimental-features = nix-command flakes\n" >> ~/.config/nix/nix.conf
- Install
git
(if you don't have it alerady installed)nix-env -i git
- Build this flake and start the jupyter notebook server
where
nix run github:ilya-kolpakov/scanpy-nix-flake -- --notebook-dir=/path/to/notebooks
/path/to/notebooks
is the top-level directory to be served via the web UI. Add--ip=0.0.0.0
if you want to server to be accessible from other machines.
Building:
nix build .#docker-image
# ./result points to a tar.gz image in nix store
readlink -e ./result
# /nix/store/<HASH>-docker-image-jupyter-scanpy.tar.gz
Using:
zcat jupyter-scanpy-<HASH>.tar.gz | sudo docker load
docker run -p 8888:8888 -v ../path/to/notebooks:/notebooks
First build the docker image, unzip the tar file and run
singularity build image.sif docker-archive://path/to/image.tar