Skip to content
Snippets Groups Projects
Commit 830e1bf3 authored by Athanasios Karmas's avatar Athanasios Karmas
Browse files

release v0.1 hotfix to include clb-nb-utils package

enable user to install packages with pip and
start JupyterLab kernel with the default profile
parent c5211577
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,12 @@ spack repo add /srv/$INSTALLATION_ROOT/ebrains-spack-builds ...@@ -20,7 +20,12 @@ spack repo add /srv/$INSTALLATION_ROOT/ebrains-spack-builds
#spack env activate $SPACKIFIED_ENV #spack env activate $SPACKIFIED_ENV
module use /srv/$INSTALLATION_ROOT/spack/share/spack/modules/linux-centos7-broadwell/ module use /srv/$INSTALLATION_ROOT/spack/share/spack/modules/linux-centos7-broadwell/
module use /srv/$INSTALLATION_ROOT/spack/share/spack/modules/linux-centos7-x86_64/
source /srv/$INSTALLATION_ROOT/spack/var/spack/environments/$SPACKIFIED_ENV/loads source /srv/$INSTALLATION_ROOT/spack/var/spack/environments/$SPACKIFIED_ENV/loads
# add also user's .local python3.8 packages to allow package installation at runtime
# by the user using pip
export PYTHONPATH=$PYTHONPATH:/opt/app-root/src/.local/lib/python3.8/site-packages
export PATH=$PATH:/opt/app-root/src/.local/bin
# capture the env after spack activation # capture the env after spack activation
cd /opt/app-root/src cd /opt/app-root/src
...@@ -49,7 +54,7 @@ chmod +x $LAB_KERNEL_PATH/bin/env.sh ...@@ -49,7 +54,7 @@ chmod +x $LAB_KERNEL_PATH/bin/env.sh
mkdir $LAB_KERNEL_PATH/spack_python_kernel_release_20210930 mkdir $LAB_KERNEL_PATH/spack_python_kernel_release_20210930
cat <<EOF >$LAB_KERNEL_PATH/spack_python_kernel_release_20210930/kernel.json cat <<EOF >$LAB_KERNEL_PATH/spack_python_kernel_release_20210930/kernel.json
{ {
"argv": ["$LAB_KERNEL_PATH/bin/env.sh", "{connection_file}"], "argv": ["$LAB_KERNEL_PATH/bin/env.sh", "{connection_file}", "--profile=default"],
"display_name": "EBRAINS_release_v0.1_202109", "display_name": "EBRAINS_release_v0.1_202109",
"name": "spack_python_kernel_release_20210930", "name": "spack_python_kernel_release_20210930",
"language": "python" "language": "python"
......
from spack import *
# Usage
# from clb_nb_utils import oauth
# oauth.get_token()
class ClbNbUtils(PythonPackage):
url = 'https://github.com/HumanBrainProject/clb-nb-utils/archive/refs/heads/master.zip'
maintainers = ['akarmas']
version('0.1.0','aa079ed0a8c4806db4657a6e7b534f4d')
depends_on('python@3.8:', type=('build','run'))
depends_on('py-setuptools', type=('build','run'))
depends_on('py-requests', type=('build','run'))
...@@ -7,6 +7,8 @@ spack: ...@@ -7,6 +7,8 @@ spack:
- py-ipython %gcc@10.3.0 - py-ipython %gcc@10.3.0
- py-ipykernel %gcc@10.3.0 - py-ipykernel %gcc@10.3.0
- py-notebook %gcc@10.3.0 - py-notebook %gcc@10.3.0
# Collab utils
- clb-nb-utils@0.1.0 %gcc@10.3.0
# General # General
- py-pip %gcc@10.3.0 - py-pip %gcc@10.3.0
- py-numpy %gcc@10.3.0 - py-numpy %gcc@10.3.0
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment