Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to get the jlab dockerfile building - some should be reverted later #939

Open
wants to merge 40 commits into
base: jupyterhub-update
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ef901b5
Regenerated cache
pgleeson Feb 7, 2024
bc289b9
Regenerated
pgleeson Feb 20, 2024
d4d5d25
Merge branch 'develop' into feature/repo_updates_via_api
pgleeson Feb 20, 2024
b8d4c29
Regenerated
pgleeson Feb 21, 2024
4134ee9
Regenerated
pgleeson Mar 4, 2024
e8dd422
Merge branch 'develop' into feature/repo_updates_via_api
pgleeson Mar 4, 2024
c04dd44
More modeldb models
pgleeson Mar 4, 2024
a6399d0
Merge branch 'develop' into feature/repo_updates_via_api
pgleeson Apr 24, 2024
85a3e9a
Add locust net model on v1
pgleeson Apr 24, 2024
7626ad1
Add xpp and biosimulators showcases on osb GH
pgleeson Apr 24, 2024
afd1a2b
Change filipo info
pgleeson Apr 24, 2024
402620a
New v2 live repo
pgleeson Apr 24, 2024
6e908ec
Merge branch 'develop' into feature/repo_updates_via_api
pgleeson May 15, 2024
08c5c0c
Updates to modeldb & osbv2
pgleeson May 31, 2024
5ce499e
More cached repos
pgleeson Jul 4, 2024
2b81fd3
Mainly modeldb updates
pgleeson Jul 31, 2024
1ac4528
Merge branch 'develop' into feature/repo_updates_via_api
pgleeson Jul 31, 2024
4273d6f
Updates post CNS 2024
pgleeson Jul 31, 2024
2509417
Minor osb
pgleeson Jul 31, 2024
9bd58df
Minor additions
pgleeson Aug 15, 2024
1024eef
More in model db
pgleeson Aug 29, 2024
cf44050
Adding new repos on gh & osbv2
pgleeson Nov 26, 2024
4e3754f
Modeldb updates & osb gh repos
pgleeson Dec 5, 2024
ff9bbe5
Add neuromlsbmlshowcase test project
pgleeson Dec 5, 2024
c95a0bc
Picking up osb gh changes
pgleeson Dec 5, 2024
b3f656f
Regenerate GH osb cache; enable actions
pgleeson Dec 11, 2024
d0de607
ImportError: cannot import name 'tarfile' from 'backports'
pgleeson Dec 11, 2024
92377cc
Merge branch 'feature/repo_updates_via_api' of github.com:OpenSourceB…
pgleeson Dec 11, 2024
fdf88cb
Move recent pip fix
pgleeson Dec 11, 2024
718b85e
Regenerated multiple caches & updated osbv2 live
pgleeson Dec 11, 2024
294b64a
Update caches
pgleeson Jan 9, 2025
8569366
Modified requirements.txt for python 3.12
pgleeson Jan 9, 2025
a5366a3
More mods to dockerfile to get it building...
pgleeson Jan 9, 2025
1b6cc14
Updated caches
pgleeson Jan 22, 2025
46bbb12
Added a first biomodels one!
pgleeson Jan 22, 2025
106342f
Initial biomodels
pgleeson Jan 23, 2025
752db52
Initial netpyne script
pgleeson Jan 23, 2025
c946244
Quick ruff reformatting
pgleeson Jan 23, 2025
1dafe78
More ruff
pgleeson Jan 23, 2025
af807b0
Merge branch 'feature/repo_updates_via_api' into feature/docker-jupyt…
pgleeson Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker-jupyterlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image Build Jupyterlab

on:
push:
branches: [ master, dev*, feature/docker*, jupyterhub-update ]
branches: [ master, dev*, feature/docker*, feature/repo*, jupyterhub-update ]
pull_request:
branches: [ master, dev*, feature/docker*, jupyterhub-update ]
branches: [ master, dev*, feature/docker*, feature/repo*, jupyterhub-update ]

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-netpyne.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image Build NetPyNE-UI

on:
push:
branches: [ master, dev*, feature/docker*, jupyterhub-update ]
branches: [ master, dev*, feature/docker*, feature/repo*, jupyterhub-update ]
pull_request:
branches: [ master, dev*, feature/docker*, jupyterhub-update ]
branches: [ master, dev*, feature/docker*, feature/repo*, jupyterhub-update ]

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-nwbe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image Build NWB Explorer

on:
push:
branches: [ master, dev*, feature/docker*, jupyterhub-update ]
branches: [ master, dev*, feature/docker*, feature/repo*, jupyterhub-update ]
pull_request:
branches: [ master, dev*, feature/docker*, jupyterhub-update ]
branches: [ master, dev*, feature/docker*, feature/repo*, jupyterhub-update ]

jobs:

Expand Down
7 changes: 4 additions & 3 deletions applications/jupyterlab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt --upgrade --no-cache-dir

#### General Python packages
RUN jupyter labextension install plotlywidget
####RUN jupyter labextension install plotlywidget


##############
Expand Down Expand Up @@ -105,12 +105,13 @@ ENV PATH=$PATH:$NEST_HOME/bin

USER jovyan
#### Install Python packages
RUN pip install backports.tarfile>=1.2 # temp fix for error: ImportError: cannot import name 'tarfile' from 'backports'
RUN pip install -r requirements.txt --upgrade --no-cache-dir

# Compile NEURON mod files for PyNN
RUN cd /opt/conda/lib/python3.9/site-packages/pyNN/neuron/nmodl && nrnivmodl
RUN cd /opt/conda/lib/python3.12/site-packages/pyNN/neuron/nmodl && nrnivmodl
# See https://github.com/OpenSourceBrain/osb-model-validation/issues/91 for status of this
RUN pip install 'numpy<=1.23.0' # temp fix for https://levelup.gitconnected.com/fix-attributeerror-module-numpy-has-no-attribute-float-d7d68c5a4971
######RUN pip install 'numpy<=1.23.0' # temp fix for https://levelup.gitconnected.com/fix-attributeerror-module-numpy-has-no-attribute-float-d7d68c5a4971

#########################################################################
# fix for https://github.com/jupyter/notebook/issues/7048
Expand Down
8 changes: 4 additions & 4 deletions applications/jupyterlab/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pyelectro
git+https://github.com/NeuralEnsemble/neurotune.git

#### NEURON & NetPyNE
neuron==8.1
neuron==8.2.4

# Install specific version of NetPyNE
git+https://github.com/Neurosim-lab/netpyne.git@osbv2#egg=netpyne
Expand Down Expand Up @@ -42,13 +42,13 @@ seaborn

# Note: this just installs pytorch for cpu, the default install adds a v large cuda lib
-f https://download.pytorch.org/whl/torch_stable.html
torch==2.1.2+cpu
torch==2.2.0+cpu

# For MDF
modeci_mdf==0.4.8 # big jump in size of image...
#########modeci_mdf==0.4.8 # big jump in size of image...

scikit-learn # Required for some Neuromatch Academy material
fasttext # Required for some Neuromatch Academy material
#########fasttext # Required for some Neuromatch Academy material


#### TVB etc.
Expand Down
107 changes: 107 additions & 0 deletions libraries/client/biomodels_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
"""
Script to get Biomodels project info
"""

import json
import pprint
from loadbiomodels import get_model_identifiers, get_model_info

verbose = True #
verbose = False

info_all = {}


if __name__ == "__main__":
min_index = 0
max_index = 20
index = 0

from loadbiomodels import get_model_identifiers

model_ids = get_model_identifiers()["models"]

selection = model_ids[min_index:max_index]

for model_id in selection:
print(
"\n-------- Model (%i/%i, order %i): %s:\n"
% (index, len(selection), index + min_index, model_id)
)

model_link = f"[{model_id}](https://www.ebi.ac.uk/biomodels/{model_id})"
info = get_model_info(model_id)
model_name = info["name"]
print(f" {model_id}: \n {pprint.pformat(info['name'])}--")

info_all[model_id] = info
"""
son.loads(get_page('https://modeldb.science/api/v1/models/%s'%model))

print(' %s'%info[model]['name'])
if 'gitrepo' in info[model] and info[model]['gitrepo']:
with_gitrepo+=1
print(' gitrepo: %s'%info[model]['gitrepo'])
else:
print(' gitrepo: %s'%False)

expected_forks = 0
possible_mdb_repo = 'ModelDBRepository/%s'%(info[model]['id'])
try:
mdb_repo = gh.get_repo(possible_mdb_repo)

repo_to_use = mdb_repo
print(' Exists at: %s (def branch: %s; forks: %i)'%(mdb_repo.html_url, mdb_repo.default_branch, mdb_repo.forks))

possible_osbgh_repo = 'OpenSourceBrain/%s'%(info[model]['id'])
try:
osb_repo = gh.get_repo(possible_osbgh_repo)
msg = ' Exists at: %s (def branch: %s; forks: %i), order %i'%(osb_repo.html_url, osb_repo.default_branch, osb_repo.forks, index+min_index)
on_osbv2.append(msg)
print(msg)
repo_to_use = osb_repo
expected_forks+=1

info[model]['osbv2_gh_repo'] = repo_to_use.html_url
info[model]['osbv2_gh_branch'] = repo_to_use.default_branch
except:
print(' Missing fork: %s, forking now: %s'%(possible_osbgh_repo, fork_if_missing))
if fork_if_missing:
print(' Forking to: %s...'%possible_osbgh_repo)
org = gh.get_organization('OpenSourceBrain')
org.create_fork(mdb_repo,default_branch_only=False)
msg = ' Forked to: %s...'%possible_osbgh_repo
print(msg)
forked_now.append(msg)

else:
msg = ' Yet to be forked: %i, order %i; %s'%(info[model]['id'], index+min_index,info[model]['name'])
print(msg)
to_be_forked.append(msg)


if (not mdb_repo.forks==expected_forks) and (not (info[model]['id'] in known_to_have_other_forks)):
msg = ' Unexpected forks for %i (%s != %s)...'%(info[model]['id'], mdb_repo.forks,expected_forks)
print(msg)
many_forks.append(msg)

except:
msg = ' Problem locating repo for: %i (%i/%i) %s'%(info[model]['id'],index, len(selection), info[model]['name'])
print(msg)
errors.append(msg)"""

index += 1

if verbose:
infop = pprint.pprint(info_all, compact=True)

print("\nThere were %i models checked\n" % (len(info)))

filename = "cached_info/biomodels.json"

strj = json.dumps(info_all, indent=" ", sort_keys=True)
with open(filename, "w") as fp:
fp.write(strj)


print("Data on Biomodels (%i models) written to %s" % (len(info), filename))
Loading
Loading