-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit df1198e
Showing
74 changed files
with
5,271 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
**/__pycache__ | ||
**/venv | ||
**/.venv | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
LOG_LEVEL=DEBUG | ||
OPENAI_API_BASE=http://localhost:5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[flake8] | ||
# E501 string literal is too long | ||
# W503 line break before binary operator | ||
# E203 whitespace before ':' (triggered on list slices like xs[i : i + 5]) | ||
ignore = E501, W503, E203 | ||
exclude = | ||
.venv, | ||
.nox, | ||
.pytest_cache, | ||
__pycache__, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"LABEL": { | ||
"name": "", | ||
"color": "EEEEEE" | ||
}, | ||
"CHECKS": { | ||
"prefixes": ["fix: ", "feat: ", "feature: ", "chore: ", "hotfix: "] | ||
}, | ||
"MESSAGES": { | ||
"success": "All OK", | ||
"failure": "Missing prefix", | ||
"notice": "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Code checks - tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- development | ||
- release-* | ||
|
||
jobs: | ||
run_tests: | ||
uses: epam/ai-dial-ci/.github/workflows/test_python_docker.yml@0.1.0 | ||
with: | ||
bypass_checks: false | ||
python_version: 3.11 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Release version | ||
|
||
on: | ||
push: | ||
branches: [ development, release-* ] | ||
|
||
env: | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
release: | ||
uses: epam/ai-dial-ci/.github/workflows/publish_python_docker.yml@0.1.0 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
**/node_modules/ | ||
*.egg-info | ||
.DS_Store | ||
__pycache__ | ||
.vs/ | ||
.gradle/ | ||
.idea/ | ||
*.suo | ||
*.user | ||
*.nupkg | ||
*.dll | ||
obj/ | ||
bin/ | ||
build/ | ||
out/ | ||
.tmp | ||
.env | ||
~* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"cwd": "${workspaceFolder}", | ||
"justMyCode": false | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"python.analysis.typeCheckingMode": "basic", | ||
"cSpell.enabled": true, | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"**/__pycache__": true, | ||
"**/.pytest_cache": true, | ||
"**/.gradle": true, | ||
"**/bin": true, | ||
"**/build": true, | ||
".idea": true, | ||
".venv": true | ||
}, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# For more information, please refer to https://aka.ms/vscode-docker-python | ||
FROM python:3.11-alpine AS builder | ||
|
||
ARG POETRY_VERSION=1.6.1 | ||
|
||
# Install alpine-sdk to compile some langchain dependencies (numexpr, numpy) | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install poetry==$POETRY_VERSION | ||
|
||
# Test if Poetry is installed in the expected path | ||
RUN echo "Poetry version:" && poetry --version | ||
|
||
# Set the working directory for the app | ||
WORKDIR /app | ||
COPY pyproject.toml poetry.lock poetry.toml ./ | ||
|
||
# Install dependencies | ||
RUN poetry install --no-interaction --no-ansi --only main | ||
|
||
COPY aidial_assistant/ ./aidial_assistant/ | ||
|
||
# Use a multi-stage build to run the server | ||
FROM python:3.11-alpine | ||
|
||
# Keeps Python from generating .pyc files in the container | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
||
# Turns off buffering for easier container logging | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
ENV LOG_LEVEL=INFO | ||
|
||
# Install libstdc++ to run the compiled dependencies | ||
|
||
# Create a non-root user with an explicit UID | ||
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers | ||
RUN adduser -u 1001 --disabled-password --gecos "" appuser | ||
# Copy and add permission to access the /app folder | ||
COPY --chown=appuser --from=builder /app /app | ||
WORKDIR /app | ||
|
||
# "Activate" the virtual environment | ||
ENV PATH=/app/.venv/bin:$PATH | ||
|
||
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug | ||
EXPOSE 5000 | ||
|
||
USER appuser | ||
CMD ["uvicorn", "aidial_assistant.app:app", "--host", "0.0.0.0", "--port", "5000", "--workers", "10"] |
Oops, something went wrong.