Skip to content

Commit de9e3fc

Browse files
Initial commit
0 parents  commit de9e3fc

22 files changed

+1261
-0
lines changed

.drone.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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+
- main
77+
- beta-v2
78+
event:
79+
- push
80+
81+
---
82+
kind: pipeline
83+
type: docker
84+
name: gpu
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+
registry: registry.dev.onetask.ai
100+
username:
101+
from_secret: docker_username
102+
password:
103+
from_secret: docker_password
104+
dockerfile: gpu.Dockerfile
105+
repo: "registry.dev.onetask.ai/${DRONE_REPO}"
106+
tags: ["${DRONE_COMMIT_SHA}_gpu", "${DRONE_COMMIT_BRANCH}_gpu"]
107+
cache_from:
108+
- "registry.dev.onetask.ai/${DRONE_REPO}:gpu"
109+
- "registry.dev.onetask.ai/${DRONE_REPO}:${DRONE_COMMIT_BRANCH}_gpu"
110+
111+
trigger:
112+
branch:
113+
- main
114+
- beta-v2
115+
event:
116+
- push

.gitignore

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

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "submodules/model"]
2+
path = submodules/model
3+
url = [email protected]:code-kern-ai/submodule-model.git
4+
[submodule "submodules/s3"]
5+
path = submodules/s3
6+
url = [email protected]:code-kern-ai/submodule-s3.git

Dockerfile

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

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# refinery-embedder [![Build Status](https://drone.dev.onetask.ai/api/badges/code-kern-ai/refinery-embedder/status.svg)](https://drone.dev.onetask.ai/code-kern-ai/refinery-embedder)
2+
[![refinery repository](https://uploads-ssl.webflow.com/61e47fafb12bd56b40022a49/62c2f30f935f4d37dc864eeb_Kern%20refinery.png)](https://github.com/code-kern-ai/refinery)
3+
4+
Embedder for [refinery](https://github.com/code-kern-ai/refinery). Manages the creation of document- and token-level embeddings using the [`embedders`](https://github.com/code-kern-ai/embedders) library.
5+
6+
7+
If you like what we're working on, please leave a ⭐ for [refinery](https://github.com/code-kern-ai/refinery)!

0 commit comments

Comments
 (0)