Use virtual environment instead of nix packages
This commit is contained in:
parent
7777d07bf2
commit
2425648aac
6
.envrc
6
.envrc
|
@ -1 +1,5 @@
|
|||
use nix
|
||||
use nix
|
||||
|
||||
VIRTUAL_ENV="$PWD/venv"
|
||||
export VIRTUAL_ENV
|
||||
PATH_add "$VIRTUAL_ENV/bin"
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
__pycache__
|
||||
.ipynb_checkpoints
|
||||
venv
|
||||
|
||||
plots/*
|
||||
!.gitkeep
|
99
requirements.txt
Normal file
99
requirements.txt
Normal file
|
@ -0,0 +1,99 @@
|
|||
anyio==3.6.2
|
||||
argon2-cffi==21.3.0
|
||||
argon2-cffi-bindings==21.2.0
|
||||
arrow==1.2.3
|
||||
asttokens==2.2.1
|
||||
attrs==22.1.0
|
||||
autopep8==2.0.1
|
||||
backcall==0.2.0
|
||||
beautifulsoup4==4.11.1
|
||||
bleach==5.0.1
|
||||
cffi==1.15.1
|
||||
comm==0.1.2
|
||||
contourpy==1.0.6
|
||||
cycler==0.11.0
|
||||
debugpy==1.6.4
|
||||
decorator==5.1.1
|
||||
defusedxml==0.7.1
|
||||
entrypoints==0.4
|
||||
executing==1.2.0
|
||||
fastjsonschema==2.16.2
|
||||
fonttools==4.38.0
|
||||
fqdn==1.5.1
|
||||
idna==3.4
|
||||
ipykernel==6.19.2
|
||||
ipython==8.7.0
|
||||
ipython-genutils==0.2.0
|
||||
ipywidgets==8.0.3
|
||||
isoduration==20.11.0
|
||||
jedi==0.18.2
|
||||
Jinja2==3.1.2
|
||||
jsonpointer==2.3
|
||||
jsonschema==4.17.3
|
||||
jupyter==1.0.0
|
||||
jupyter-console==6.4.4
|
||||
jupyter-events==0.5.0
|
||||
jupyter_client==7.4.8
|
||||
jupyter_core==5.1.0
|
||||
jupyter_server==2.0.1
|
||||
jupyter_server_terminals==0.4.2
|
||||
jupyterlab-pygments==0.2.2
|
||||
jupyterlab-widgets==3.0.4
|
||||
kiwisolver==1.4.4
|
||||
MarkupSafe==2.1.1
|
||||
matplotlib==3.6.2
|
||||
matplotlib-inline==0.1.6
|
||||
mistune==2.0.4
|
||||
nbclassic==0.4.8
|
||||
nbclient==0.7.2
|
||||
nbconvert==7.2.6
|
||||
nbformat==5.7.0
|
||||
nest-asyncio==1.5.6
|
||||
noise==1.2.2
|
||||
notebook==6.5.2
|
||||
notebook_shim==0.2.2
|
||||
numpy==1.23.5
|
||||
opencv-python==4.6.0.66
|
||||
packaging==22.0
|
||||
pandocfilters==1.5.0
|
||||
parso==0.8.3
|
||||
pexpect==4.8.0
|
||||
pickleshare==0.7.5
|
||||
Pillow==9.3.0
|
||||
platformdirs==2.6.0
|
||||
prometheus-client==0.15.0
|
||||
prompt-toolkit==3.0.36
|
||||
psutil==5.9.4
|
||||
ptyprocess==0.7.0
|
||||
pure-eval==0.2.2
|
||||
pycairo==1.23.0
|
||||
pycodestyle==2.10.0
|
||||
pycparser==2.21
|
||||
Pygments==2.13.0
|
||||
pyparsing==3.0.9
|
||||
pyrsistent==0.19.2
|
||||
python-dateutil==2.8.2
|
||||
python-json-logger==2.0.4
|
||||
PyYAML==6.0
|
||||
pyzmq==24.0.1
|
||||
qtconsole==5.4.0
|
||||
QtPy==2.3.0
|
||||
rfc3339-validator==0.1.4
|
||||
rfc3986-validator==0.1.1
|
||||
scipy==1.9.3
|
||||
Send2Trash==1.8.0
|
||||
six==1.16.0
|
||||
sniffio==1.3.0
|
||||
soupsieve==2.3.2.post1
|
||||
stack-data==0.6.2
|
||||
terminado==0.17.1
|
||||
tinycss2==1.2.1
|
||||
tomli==2.0.1
|
||||
tornado==6.2
|
||||
traitlets==5.7.1
|
||||
uri-template==1.2.0
|
||||
wcwidth==0.2.5
|
||||
webcolors==1.12
|
||||
webencodings==0.5.1
|
||||
websocket-client==1.4.2
|
||||
widgetsnbextension==4.0.4
|
33
shell.nix
33
shell.nix
|
@ -1,15 +1,20 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
pythonWithPackages = pkgs.python3.withPackages (p: with p; [
|
||||
pycairo
|
||||
numpy
|
||||
jupyter
|
||||
ipykernel
|
||||
matplotlib
|
||||
scipy
|
||||
opencv4
|
||||
noise
|
||||
autopep8
|
||||
]);
|
||||
in
|
||||
pythonWithPackages.env
|
||||
|
||||
pkgs.mkShell {
|
||||
name = "plotter-env";
|
||||
buildInputs = with pkgs; [
|
||||
python310
|
||||
python310Packages.venvShellHook
|
||||
autoPatchelfHook
|
||||
];
|
||||
propagatedBuildInputs = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
venvDir = "./venv";
|
||||
postVenvCreation = ''
|
||||
pip install -U pip setuptools wheel
|
||||
pip install -r requirements.txt
|
||||
autoPatchelf ./venv
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue