Skip to content

Commit 53a505c

Browse files
authored
Initial commit
0 parents  commit 53a505c

12 files changed

Lines changed: 722 additions & 0 deletions

File tree

.env.dist

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ODTP COMPONENT VARIABLES
2+
VARIABLES=
3+
# ODTP ENV VARIABLES TO CONNECT
4+
ODTP_MONGO_SERVER=
5+
ODTP_S3_SERVER=
6+
ODTP_BUCKET_NAME=
7+
ODTP_ACCESS_KEY=
8+
ODTP_SECRET_KEY=
9+
# ODTP ENV VARIABLES DB REFERENCES
10+
ODTP_USER_ID=
11+
ODTP_DIGITAL_TWIN=
12+
ODTP_EXCUTION=
13+
ODTP_STEP=
14+
ODTP_COMPONENT=
15+
ODTP_COMPONENT_VERSION=

.gitignore

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Mac crap
2+
.DS_Store
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
pip-wheel-metadata/
27+
share/python-wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
.python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "odtp-component-client"]
2+
path = odtp-component-client
3+
url = https://github.com/odtp-org/odtp-component-client

Dockerfile

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt update
4+
RUN apt install python3.10 python3-pip -y
5+
6+
##################################################
7+
# Ubuntu setup
8+
##################################################
9+
10+
RUN apt-get update \
11+
&& apt-get install -y wget \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
RUN apt-get update && apt-get -y upgrade \
15+
&& apt-get install -y --no-install-recommends \
16+
unzip \
17+
nano \
18+
git \
19+
g++ \
20+
gcc \
21+
htop \
22+
zip \
23+
ca-certificates \
24+
&& rm -rf /var/lib/apt/lists/*
25+
26+
##################################################
27+
# ODTP setup
28+
##################################################
29+
30+
COPY odtp-component-client/requirements.txt /tmp/odtp.requirements.txt
31+
RUN pip install -r /tmp/odtp.requirements.txt
32+
33+
34+
#######################################################################
35+
# PLEASE INSTALL HERE ALL SYSTEM DEPENDENCIES RELATED TO YOUR TOOL
36+
#######################################################################
37+
38+
# Installing dependecies from the app
39+
COPY requirements.txt /tmp/requirements.txt
40+
RUN pip install -r /tmp/requirements.txt
41+
42+
43+
######################################################################
44+
# ODTP COMPONENT CONFIGURATION.
45+
# DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING.
46+
######################################################################
47+
48+
##################################################
49+
# ODTP Preparation
50+
##################################################
51+
52+
RUN mkdir /odtp \
53+
/odtp/odtp-config \
54+
/odtp/odtp-app \
55+
/odtp/odtp-component-client \
56+
/odtp/odtp-logs \
57+
/odtp/odtp-input \
58+
/odtp/odtp-workdir \
59+
/odtp/odtp-output
60+
61+
# This last 2 folders are specific from odtp-eqasim
62+
RUN mkdir /odtp/odtp-workdir/cache \
63+
/odtp/odtp-workdir/output
64+
65+
# This copy all the information for running the ODTP component
66+
COPY odtp.yml /odtp/odtp-config/odtp.yml
67+
68+
COPY ./odtp-component-client /odtp/odtp-component-client
69+
70+
COPY ./app /odtp/odtp-app
71+
WORKDIR /odtp
72+
73+
ENTRYPOINT ["bash", "/odtp/odtp-component-client/startup.sh"]

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BSD 3-Clause "New" or "Revised" License
2+
Licence ID
3+
BSD-3-Clause
4+
Licence text
5+
Copyright (c) 2023-2024 Swiss Data Science Center. All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
12+
13+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)