Skip to content

feat: update aithena-services 0.1.1-dev0 #20

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 backends/ollama-backend/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.3.10"
appVersion: "0.4.4"

# My common code in my library chart
dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ spec:
accessModes:
- {{ .Values.persistentVolume.accessMode | default "ReadWriteOnce" | quote }}
persistentVolumeReclaimPolicy: {{ .Values.persistentVolume.reclaimPolicy | default "Retain" | quote }}
storageClassName: {{ .Values.persistentVolume.storageClass | default "manual" | quote }}
hostPath:
path: {{required "Provide the path to storage on local filesystem." .Values.persistentVolume.hostPath | quote}}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ spec:
resources:
requests:
storage: {{required "Provide requested storage size." .Values.persistentVolumeClaim.storage | quote}}
storageClassName: {{ .Values.persistentVolumeClaim.storageClass | default "manual" | quote }}
{{- end -}}

{{- define "job-lib-chart.pvc" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ spec:
{{- if .Values.service.port }}
ports:
- containerPort: {{ .Values.service.port }}
{{- if .Values.service.hostPort }}
hostPort: {{ .Values.service.hostPort }}
{{- end }}
{{- end }}

# Mount all declared secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ spec:
accessModes:
- {{ .Values.persistentVolume.accessMode | default "ReadWriteOnce" | quote }}
persistentVolumeReclaimPolicy: {{ .Values.persistentVolume.reclaimPolicy | default "Retain" | quote }}
storageClassName: {{ .Values.persistentVolume.storageClass | default "manual" | quote }}
hostPath:
path: {{required "Provide the path to storage on local filesystem." .Values.persistentVolume.hostPath | quote}}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ spec:
resources:
requests:
storage: {{required "Provide requested storage size." .Values.persistentVolumeClaim.storage | quote}}
storageClassName: {{ .Values.persistentVolumeClaim.storageClass | default "manual" | quote }}
{{- end -}}

{{- define "aithena-lib-chart.pvc" -}}
Expand Down
8 changes: 4 additions & 4 deletions services/aithena-services/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.0-dev3
current_version = 0.1.1-dev0
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<dev>\d+))?
Expand All @@ -20,8 +20,8 @@ values =
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:docker/VERSION]
search = {current_version}
replace = {new_version}
[bumpversion:file:VERSION]

[bumpversion:file:README.md]

[bumpversion:file:src/aithena_services/__init__.py]
186 changes: 186 additions & 0 deletions services/aithena-services/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
.vscode
**/.venv/
.mypy_cache
.env

#logs
*.out
*.log

# poetry
poetry.lock

# 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/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# 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/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# vscode
.vscode


#macOS
*.DS_Store


#husky
node_modules

# secrets
**/**-secret.yaml
22 changes: 22 additions & 0 deletions services/aithena-services/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.11-slim

# environment variables
ENV AITHENA_LOG_LEVEL="DEBUG"
ENV EXEC_DIR="/opt/executables"
# Work directory defined in the base container
WORKDIR ${EXEC_DIR}

# TOOL_DIR Argument to the Dockerfile
ARG TOOL_DIR="."

# Copy the repository into the container
RUN mkdir aithena
COPY $TOOL_DIR ${EXEC_DIR}/aithena/${TOOL_DIR}
COPY common ${EXEC_DIR}/aithena/common

# Install the tool
RUN pip3 install "${EXEC_DIR}/aithena/${TOOL_DIR}"

EXPOSE 80

CMD ["bash", "-c", "uvicorn aithena_services.api.main:app --host 0.0.0.0 --port 80"]
13 changes: 5 additions & 8 deletions services/aithena-services/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# aithena-services 0.1.0-dev3
# aithena-services 0.1.1-dev0

Aithena-services provide a unified way to interact with many llms.
Aithena-services provides a unified way to interact with many LLMs.

It uses llama-index to interact with several existing llm backends:
It uses llama-index to interact with several existing LLM backends:
- ollama
- openai
- azure_openai

The package can be used directly as a python client or can be deployed
as a rest service.
The package can be used directly as a python client or can be deployed as a REST service.

## Configuration

Expand Down Expand Up @@ -108,6 +107,4 @@ Currently the image needs to be build from the top-level directory:
`cd services/aithena-services`
`./docker/build-docker.sh`

Make sure no .env file is present is `services/aithena-services/src/aithena_services`
or this file will be committed with the image leaking your secrets and
it will also prevent any later configuration attempt.
Make sure no .env file is present is `services/aithena-services/src/aithena_services` or this file will be committed with the image leaking your secrets and it will also prevent any later configuration attempt.
1 change: 1 addition & 0 deletions services/aithena-services/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.1-dev0
Loading