Skip to content

Commit 0a43dde

Browse files
committed
Initial commit
0 parents  commit 0a43dde

File tree

18 files changed

+1224
-0
lines changed

18 files changed

+1224
-0
lines changed

.drone.yml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
kind: pipeline
2+
type: docker
3+
name: amd64
4+
5+
platform:
6+
arch: amd64
7+
8+
steps:
9+
- name: submodules
10+
image: alpine/git
11+
commands:
12+
- git submodule init
13+
- 'git config --global url."https://github.com/".insteadOf [email protected]:'
14+
- "git submodule update --recursive --remote"
15+
- name: build and publish
16+
image: plugins/docker
17+
settings:
18+
registry: registry.dev.onetask.ai
19+
username:
20+
from_secret: docker_username
21+
password:
22+
from_secret: docker_password
23+
repo: "registry.dev.onetask.ai/${DRONE_REPO}"
24+
tags: ["${DRONE_COMMIT_SHA}", "${DRONE_COMMIT_BRANCH}"]
25+
cache_from:
26+
- "registry.dev.onetask.ai/${DRONE_REPO}:main"
27+
- "registry.dev.onetask.ai/${DRONE_REPO}:${DRONE_COMMIT_BRANCH}"
28+
- name: trigger update
29+
image: appleboy/drone-ssh
30+
settings:
31+
host: app.dev.onetask.ai
32+
username:
33+
from_secret: ssh_user
34+
key:
35+
from_secret: ssh_key
36+
ssh_passphrase:
37+
from_secret: ssh_passphrase
38+
script:
39+
- /bin/sh ./trigger_dev_deployment.sh
40+
41+
trigger:
42+
event:
43+
- push
44+
45+
---
46+
kind: pipeline
47+
type: docker
48+
name: arm64
49+
50+
platform:
51+
arch: arm64
52+
53+
steps:
54+
- name: submodules
55+
image: alpine/git
56+
commands:
57+
- git submodule init
58+
- 'git config --global url."https://github.com/".insteadOf [email protected]:'
59+
- "git submodule update --recursive --remote"
60+
- name: build and publish
61+
image: plugins/docker
62+
settings:
63+
registry: registry.dev.onetask.ai
64+
username:
65+
from_secret: docker_username
66+
password:
67+
from_secret: docker_password
68+
repo: "registry.dev.onetask.ai/${DRONE_REPO}"
69+
tags: ["${DRONE_COMMIT_SHA}_arm64", "${DRONE_COMMIT_BRANCH}_arm64"]
70+
cache_from:
71+
- "registry.dev.onetask.ai/${DRONE_REPO}:main_arm64"
72+
- "registry.dev.onetask.ai/${DRONE_REPO}:${DRONE_COMMIT_BRANCH}_arm64"
73+
74+
trigger:
75+
branch:
76+
- dev
77+
- release
78+
event:
79+
- push
80+
81+
---
82+
kind: pipeline
83+
type: docker
84+
name: amd64-dockerhub
85+
86+
platform:
87+
arch: amd64
88+
89+
steps:
90+
- name: submodules
91+
image: alpine/git
92+
commands:
93+
- git submodule init
94+
- 'git config --global url."https://github.com/".insteadOf [email protected]:'
95+
- "git submodule update --recursive --remote"
96+
- name: build and publish
97+
image: plugins/docker
98+
settings:
99+
username:
100+
from_secret: dockerhub_username
101+
password:
102+
from_secret: dockerhub_password
103+
repo: "kernai/${DRONE_REPO_NAME}"
104+
tag: "${DRONE_TAG}-drone-amd64"
105+
106+
trigger:
107+
event:
108+
- tag
109+
110+
---
111+
kind: pipeline
112+
type: docker
113+
name: arm64-dockerhub
114+
115+
platform:
116+
arch: arm64
117+
118+
steps:
119+
- name: submodules
120+
image: alpine/git
121+
commands:
122+
- git submodule init
123+
- 'git config --global url."https://github.com/".insteadOf [email protected]:'
124+
- "git submodule update --recursive --remote"
125+
- name: build and publish
126+
image: plugins/docker
127+
settings:
128+
username:
129+
from_secret: dockerhub_username
130+
password:
131+
from_secret: dockerhub_password
132+
repo: "kernai/${DRONE_REPO_NAME}"
133+
tag: "${DRONE_TAG}-drone-arm64"
134+
135+
trigger:
136+
event:
137+
- tag
138+
139+
---
140+
kind: pipeline
141+
name: manifest-version
142+
steps:
143+
- name: manifest
144+
image: plugins/manifest
145+
settings:
146+
spec: drone-manifest-version.tmpl
147+
tag: "${DRONE_TAG}"
148+
ignore_missing: true
149+
username:
150+
from_secret: dockerhub_username
151+
password:
152+
from_secret: dockerhub_password
153+
154+
depends_on:
155+
- amd64-dockerhub
156+
- arm64-dockerhub
157+
158+
trigger:
159+
event:
160+
- tag
161+
162+
---
163+
kind: pipeline
164+
name: manifest-latest
165+
steps:
166+
- name: manifest
167+
image: plugins/manifest
168+
settings:
169+
spec: drone-manifest-latest.tmpl
170+
tag: "${DRONE_TAG}"
171+
ignore_missing: true
172+
username:
173+
from_secret: dockerhub_username
174+
password:
175+
from_secret: dockerhub_password
176+
177+
depends_on:
178+
- manifest-version
179+
180+
trigger:
181+
event:
182+
- tag

.gitignore

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

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "submodules/model"]
2+
path = submodules/model
3+
url = https://github.com/code-kern-ai/refinery-submodule-model.git

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
FROM python:3.7
3+
4+
WORKDIR /program
5+
6+
COPY requirements.txt .
7+
8+
RUN pip3 install -r requirements.txt
9+
10+
COPY / .
11+
12+
CMD [ "/usr/local/bin/uvicorn", "--host", "0.0.0.0", "--port", "80", "app:app" ]

0 commit comments

Comments
 (0)