From 522b41ae1ba1de0c195e76f04c985c66c02defcc Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 19 Sep 2022 11:31:29 +0000 Subject: [PATCH] changed setup_apps_miniforge to use work-environment.yml --- setup_apps_miniforge.sh | 24 +++++++------------- work-environment.yml | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 work-environment.yml diff --git a/setup_apps_miniforge.sh b/setup_apps_miniforge.sh index acd5590..b7db47d 100644 --- a/setup_apps_miniforge.sh +++ b/setup_apps_miniforge.sh @@ -82,16 +82,15 @@ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh mkdir -p /opt/conda/envs/ -/opt/conda/bin/conda create --prefix /opt/conda/envs/default_python python=3.7 ipykernel --yes -/opt/conda/envs/default_python/bin/python -m ipykernel install --prefix /usr/local/ --name 'python3' --display-name "Python (default)" - - -#install ofen used python packages for default environment -/opt/conda/bin/conda install h5py tqdm pandas pillow matplotlib ipympl matplotlib pandas numpy --yes -n default_python -/opt/conda/bin/conda install cantera --channel cantera --yes -n default_python - -#remove ipykernel for base enviroment: +#remove existing environment and ipykernel: #jupyter kernelspec remove python3 +#/opt/conda/bin/conda env remove -p /opt/conda/envs/default_python + +#setup default conda environment +/opt/conda/bin/conda env create --prefix /opt/conda/envs/default_python -f work-environment.yml + +#setup kernel for using the enviroment in jupyter lab +/opt/conda/envs/default_python/bin/python -m ipykernel install --prefix /usr/local/ --name 'python3' --display-name "Python (default)" #users have to setup their kernel like this: @@ -99,15 +98,9 @@ mkdir -p /opt/conda/envs/ #conda create ipykernel --name mypersonal_enviroment #python -m ipykernel install --user --name mypersonal_enviroment --display-name "Python My Env" - -#conda install --yes jupyterhub jupyterlab notebook configurable-http-proxy jupyterlab-git jupyter-server-proxy -#jupyter labextension install jupyter-matplotlib - #echo "Install Tensorflow..." #conda install --yes tensorflow-gpu -c conda-forge -#echo "Install common Python libs..." -#conda install --yes h5py tqdm pandas ipywidgets pillow matplotlib ipympl opencv-python #Other tools: @@ -130,7 +123,6 @@ mkdir -p /opt/conda/envs/ echo "Start JupyterHub..." systemctl start jupyterhub.service -#sudo systemctl restart jupyterhub echo "" echo "Setup successfully finished" diff --git a/work-environment.yml b/work-environment.yml new file mode 100644 index 0000000..32ab35b --- /dev/null +++ b/work-environment.yml @@ -0,0 +1,50 @@ +name: work +channels: + - cantera + - conda-forge + - nodefaults + - bioconda #required for nmrglue (on anaconda.org) +dependencies: + - python + - matplotlib + - numpy + - pandas + - pytables + - nptdms # for Labview TDMS files + - openpyxl # read/write excel files + - snappy # for now, fixes dependency error of pytables + - scipy + - scikit-learn + - spyder + - pillow + - notebook + - jupyterthemes + - jupyter_contrib_nbextensions + - jupyter_nbextensions_configurator + - nbconvert + - nbdime + - ipypublish + - jupyter-book>=0.12.1 + - sqlalchemy~=1.3.12 # for jupyter-cache - try to update later... +# - pyppeteer + - cantera + - h5py + - cvxpy + - jupyterlab + - jupyterlab-git + - pip + - pip: + - impedance + - emd + - pyschedule + - pulp==2.0 + - ProcessScheduler + - rise + - plotly + - tqdm #easy to use progress bar: tqdm(iterable) + - odfpy #open OpenDocument spread sheed files with pandas + - psycopg2 #PostgreSQL adapter + - nmrglue #working with NMR data in Python + - jupyter_pivottablejs +# - blaze #blaze -> python[version='2.7.*|3.5.*|3.6.*'] (Your python: python=3.7) + - ipykernel \ No newline at end of file