Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 26-refactoring-the-infrastructure
  • MPGCQM_workshop
  • app
  • backup-05-08
  • develop
  • kappa_sigma_notebook
  • master
  • staging
8 results

Target

Select target project
  • nomad-lab/analytics
1 result
Select Git revision
  • 26-refactoring-the-infrastructure
  • MPGCQM_workshop
  • app
  • backup-05-08
  • develop
  • kappa_sigma_notebook
  • master
  • staging
8 results
Show changes
Showing
with 544 additions and 43 deletions
.idea
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
analytics-tutorial-template/assets/tutorial_template/logo_HU.png

449 KiB

analytics-tutorial-template/assets/tutorial_template/logo_MPG.png

176 KiB

analytics-tutorial-template/assets/tutorial_template/logo_NOMAD.png

303 KiB

Symbol, Atomic number, Atomic Mass (g/mol)
H, 1, 1.00797
He, 2, 4.00260
Li, 3, 6.941
Be, 4, 9.01218
\ No newline at end of file
{
"authors": [
"Surname, First names",
"Surname, First names"
"Surname_1, Name_1",
"Surname_2, Name_2",
"Surname_3, Name_3"
],
"email": "user@domain.com",
"title": "Title of the tutorial",
"description": "In this tutorial we will ...",
"notebook_name": "tutorial_template.ipynb",
"url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-tutorial-template",
"link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/{tutorial}.ipynb",
"link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/{tutorial}.ipynb",
"link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/tutorial_template.ipynb",
"link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/tutorial_template.ipynb",
"link_paper": "https://.../.pdf",
"link_doi_paper": "https://www.nature.com/articles/...",
"updated": "2020-04-09",
"flags":{
"featured": true,
"top_of_list": false
"top_of_list": false,
"paper": true
},
"labels": {
"application_keyword": [
"keyword1",
"keyword2"
],
"application_section": [
"Materials property prediction"
"Keyword"
],
"application_system": [
"System"
"System_property_1",
"System_property_2",
"System_property_n"
],
"category": [
"Tutorial"
"keyword"
],
"data_analytics_method": [
"Clustering"
"ai_methods": [
"AI_method_1",
"AI_method_2",
"AI_method_n"
],
"platform": [
"jupyter"
]
}
}
\ No newline at end of file
}
......@@ -5,7 +5,7 @@ with open('metainfo.json') as file:
metainfo = json.load(file)
setup(
name='{tutorial}',
name='tutorial_template',
version='1.0',
author=', '.join(metainfo['authors']),
author_email=metainfo['email'],
......@@ -13,5 +13,5 @@ setup(
description=metainfo['title'],
long_description=metainfo['description'],
packages=find_packages(),
install_requires=['numpy', 'scipy'],
install_requires=['pandas'],
)
%% Cell type:markdown id: tags:
***
<img src="assets/tutorial_template/header.jpg" width="900">
<img width="25%" style="float: right;" src=https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png>
%% Cell type:markdown id: tags:
# The title of the tutorial
created by: ... Matthias Scheffler<sup>1</sup> and Luca Ghiringhelli<sup> 1</sup>
***
<img style="float: left;" src="assets/tutorial_template/logo_MPG.png" width=150>
<img style="float: left; margin-top: -10px" src="assets/tutorial_template/logo_NOMAD.png" width=250>
<img style="float: left; margin-top: -5px" src="assets/tutorial_template/logo_HU.png" width=130>
<sup>1</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany
***
%% Cell type:markdown id: tags:
This is a template for notebooks that aim to be published in the NOMAD AI Toolkit.
Above the header and logos. Please update the address of the header with the name of the tutorial (instead of 'tutorial_template' - the header will then be automatically generated with data taken from the 'metainfo.json' file at build time), and update with the logos of your institution.
%% Cell type:markdown id: tags:
## Import modules
%% Cell type:markdown id: tags:
External modules that are imported and that need to be installed in the local environment using pip, should be specified among the requirements in the 'setup.py' file.
%% Cell type:code id: tags:
``` python
import pandas as pd
```
%% Cell type:markdown id: tags:
This interactive notebook ...
Data are stored in './data/tutorial_template'.
%% Cell type:code id: tags:
``` python
df=pd.read_csv('./data/tutorial_template/data.csv', sep=',', index_col=0)
```
%% Cell type:code id: tags:
``` python
df
```
%% Cell type:markdown id: tags:
You can define functions that are called in the tutorial in the './tutorial_template' directory.
%% Cell type:code id: tags:
``` python
from tutorial_template.functions import print_atomic_mass_average
```
%% Cell type:code id: tags:
``` python
print_atomic_mass_average(df)
```
%% Cell type:markdown id: tags:
Before pushing the notebook to its repository, please don't forget to clear the cell outputs: 'Cell' tab on the top -> 'All Output' -> 'Clear'. Then: 'File' -> 'Save'.
%% Cell type:markdown id: tags:
# Markdown cheatsheet
## Headings
```
# Heading 1
# Heading 2
## Heading 2.1
## Heading 2.2
```
## Emphasis
- Bold: __string__ or **string**
- Italic: _string_ or *string*
- Indented quoting:
> Hello world!
## Bullets/Numbered lists
- item1
- item2
- subitem1
- subitem2
1. item1
2. item2
1. subitem1
2. subitem2
## Links
- Internal: [section title](#Import-modules)
- External: [Nomad Analytics](https://www.nomad-coe.eu/index.php?page=bigdata-analyticstoolkit)
## Graphics
<img width="25%" src="https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png" title="Title text" >
## Mathematical symbols:
- Inline: $e^{i\pi} + 1 = 0$ or
$$e^x=\sum_{i=0}^\infty \frac{1}{i!}x^i$$
## Emeded code
## Embeded code
```python
def f(x):
"""a docstring"""
return x**2
```
or refering to a `function`.
## Table
| This | is |
|------|------|
| a | table|
## Horizontal lines
***
or
---
%% Cell type:markdown id: tags:
## Import modules
%% Cell type:code id: tags:
``` python
import numpy as np
import matplotlib.pyplot as plt
```
%% Cell type:code id: tags:
``` python
```
......
import pandas as pd
def print_atomic_mass_average (df):
average = df.mean(axis=0)[1]
print('The average atomic mass is ', average, '(g/mol)')
\ No newline at end of file
1666286643
git@github.com:libAtoms/QUIP.git,v0.9.10-5-gb7d59496c
# Place to override setting elsewhere, in particular things set in Makefile.linux_x86_64_gfortran
# look in QUIP/arch/Makefile.linux_x86_64_gfortran for defaults set by arch
#
# F77=gfortran
# F90=gfortran
# F95=gfortran
# CC=gcc
# CPLUSPLUS=g++
# FPP=gfortran -E -x f95-cpp-input
# LINKER=gfortran
# LIBTOOL=
# OPTIM=
# COPTIM=
# DEBUG=-O0 -g -DDUMP_CORE_ON_ABORT -DDEBUG -fbounds-check
# DEBUG=
# CDEBUG=
MATH_LINKOPTS=-llapack -lblas
PYTHON=python
PIP=pip
EXTRA_LINKOPTS=
USE_MAKEDEP=0
MAKEDEP=makedep.py
HAVE_CP2K=1
HAVE_VASP=1
HAVE_CP2K=0
HAVE_VASP=0
HAVE_TB=1
HAVE_PRECON=1
HAVE_LOTF=1
HAVE_ONIOM=1
HAVE_LOCAL_E_MIX=1
HAVE_PRECON=0
HAVE_LOTF=0
HAVE_ONIOM=0
HAVE_LOCAL_E_MIX=0
HAVE_QC=1
HAVE_GAP=1
HAVE_QR=1
......@@ -37,7 +21,7 @@ HAVE_TTM_NF=0
HAVE_CH4=0
NETCDF4_LIBS=-lnetcdf
NETCDF4_FLAGS=
HAVE_NETCDF4=0
HAVE_NETCDF4=1
HAVE_MDCORE=0
HAVE_ASAP=0
HAVE_CGAL=0
......
# Notes
Installation of quip requires a extra steps (because all git content are excluded form the docker context).
Manually generate the files of version information before building the image:
```bash
3rdparty/quip/bin/gitversion > configs/GIT_VERSION
3rdparty/quip/src/GAP/gapversion > configs/GAP_VERSION
```
\ No newline at end of file
proxy:
# secretToken: ''
# service:
# type: NodePort
# nodePorts:
# http: 31006
# https:
# enabled: false
chp:
nodeSelector:
"nomad.analytics/type": prod
hub:
# baseUrl: /dev/analytics/develop/
nodeSelector:
"nomad.analytics/type": prod
db:
type: sqlite-memory
extraEnv:
OAUTH2_AUTHORIZE_URL: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/auth
OAUTH2_TOKEN_URL: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
OAUTH_CALLBACK_URL: https://nomad-lab.eu/prod/analytics/hub/hub/oauth_callback
extraConfig:
myAuthConfig: |
c.Authenticator.auto_login = True
auth:
type: custom
custom:
className: oauthenticator.generic.GenericOAuthenticator
config:
login_service: keycloak
client_id: 'analytics-hub'
# client_secret: ''
token_url: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
userdata_url: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/userinfo
userdata_method: GET
userdata_params: {'state': 'state'}
username_key: preferred_username
admin:
users:
- lghiringhelli
- mscheidgen
- lsbailo
- afekete
singleuser:
cpu:
limit: 2
guarantee: 0.2
memory:
limit: 10G
guarantee: 1G
nodeSelector:
"nomad.analytics/type": prod-worker
image:
name: gitlab-registry.mpcdf.mpg.de/nomad-lab/analytics
# tag: ''
storage:
type: none
prePuller:
hook:
enabled: enable
scheduling:
userScheduler:
enabled: false
podPriority:
enabled: false
userPlaceholder:
enabled: false
replicas: 0
userPods:
nodeAffinity:
matchNodePurpose: prefer
proxy:
# secretToken: ''
# service:
# type: NodePort
# nodePorts:
# http: 31003
# https:
# enabled: false
chp:
nodeSelector:
"nomad.analytics/type": prod
hub:
baseUrl: /prod/analytics/public/
nodeSelector:
"nomad.analytics/type": prod
db:
type: sqlite-pvc
pvc:
storageClassName: manual-public-user-db
auth:
type: tmp
admin:
access: false
singleuser:
cpu:
limit: 2
guarantee: 0.2
memory:
limit: 10G
guarantee: 1G
nodeSelector:
"nomad.analytics/type": prod-worker
image:
name: gitlab-registry.mpcdf.mpg.de/nomad-lab/analytics
tag: production
storage:
type: none
prePuller:
hook:
enabled: enable
scheduling:
userScheduler:
enabled: false
podPriority:
enabled: false
userPlaceholder:
enabled: false
replicas: 0
userPods:
nodeAffinity:
matchNodePurpose: prefer
proxy:
# secretToken: ''
# service:
# type: NodePort
# nodePorts:
# http: 31001
# https:
# enabled: false
chp:
nodeSelector:
"nomad.analytics/type": prod
hub:
baseUrl: /prod/analytics/hub/
nodeSelector:
"nomad.analytics/type": prod
db:
type: sqlite-pvc
pvc:
storageClassName: manual-hub-user-db
extraEnv:
OAUTH2_AUTHORIZE_URL: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/auth
OAUTH2_TOKEN_URL: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
OAUTH_CALLBACK_URL: https://nomad-lab.eu/prod/analytics/hub/hub/oauth_callback
extraConfig:
myAuthConfig: |
c.Authenticator.auto_login = True
auth:
type: custom
custom:
className: oauthenticator.generic.GenericOAuthenticator
config:
login_service: keycloak
client_id: 'analytics-hub'
# client_secret: ''
token_url: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
userdata_url: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/userinfo
userdata_method: GET
userdata_params: {'state': 'state'}
username_key: preferred_username
admin:
users:
- lghiringhelli
- mscheidgen
- lsbailo
- afekete
singleuser:
cpu:
limit: 8
guarantee: 0.2
memory:
limit: 10G
guarantee: 1G
nodeSelector:
"nomad.analytics/type": prod-worker
image:
name: gitlab-registry.mpcdf.mpg.de/nomad-lab/analytics
tag: production
initContainers:
- name: fix-permissions
image: busybox
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
command: [ '/bin/sh', '-c', 'chown 1000:100 /home/jovyan']
volumeMounts:
- mountPath: /home/jovyan
name: home
subPath: '{username}'
storage:
type: static
homeMountPath: /home/jovyan/work
static:
pvcName: analytics-user-data
subPath: '{username}'
prePuller:
hook:
enabled: enable
scheduling:
userScheduler:
enabled: false
podPriority:
enabled: false
userPlaceholder:
enabled: false
replicas: 0
userPods:
nodeAffinity:
matchNodePurpose: prefer
proxy:
# secretToken: ''
# service:
# type: NodePort
# nodePorts:
# http: 31005
# https:
# enabled: false
chp:
nodeSelector:
"nomad.analytics/type": prod
hub:
baseUrl: /dev/analytics/staging/
nodeSelector:
"nomad.analytics/type": prod
db:
type: sqlite-pvc
pvc:
storageClassName: manual-hub-user-db
extraEnv:
OAUTH2_AUTHORIZE_URL: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/auth
OAUTH2_TOKEN_URL: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
OAUTH_CALLBACK_URL: https://nomad-lab.eu/prod/analytics/hub/hub/oauth_callback
extraConfig:
myAuthConfig: |
c.Authenticator.auto_login = True
auth:
type: custom
custom:
className: oauthenticator.generic.GenericOAuthenticator
config:
login_service: keycloak
client_id: 'analytics-hub'
# client_secret: ''
token_url: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
userdata_url: https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/userinfo
userdata_method: GET
userdata_params: {'state': 'state'}
username_key: preferred_username
admin:
users:
- lghiringhelli
- mscheidgen
- lsbailo
- afekete
singleuser:
cpu:
limit: 8
guarantee: 0.2
memory:
limit: 10G
guarantee: 1G
nodeSelector:
"nomad.analytics/type": prod-worker
image:
name: gitlab-registry.mpcdf.mpg.de/nomad-lab/analytics
tag: staging
storage:
type: none
prePuller:
hook:
enabled: enable
scheduling:
userScheduler:
enabled: false
podPriority:
enabled: false
userPlaceholder:
enabled: false
replicas: 0
userPods:
nodeAffinity:
matchNodePurpose: prefer
1560529911