diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..dccbd597 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ +## Expected Behavior +Please describe the behavior you are expecting. + +## Current Behavior +Please describe the behavior you are currently experiencing. + +## Steps to Reproduce +Please provide detailed steps to reproduce the issue. + +1. Step 1 +2. Step 2 +3. Step 3 + +## Possible Solution +If you have any suggestions on how to fix the issue, please describe them here. + +## Context +Please provide any additional context about the issue. + +## Screenshots +If applicable, add screenshots to help explain the issue. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..13f4bbb8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +## Description +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +## Checklist: +Please put an `x` in the boxes that apply. You can also fill these out after creating the PR. + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have tested this code locally, and it is working as intended +- [ ] I have updated the documentation accordingly + +## Screenshots +If applicable, add screenshots to help explain your changes. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..23c4cb3b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflow/docker.yaml b/.github/workflow/docker.yaml new file mode 100644 index 00000000..c1cdd05f --- /dev/null +++ b/.github/workflow/docker.yaml @@ -0,0 +1,31 @@ +name: Docker Build and Lint + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Build Docker Image + uses: docker/build-push-action@v2 + with: + context: . + push: false + tags: gpt4all-ui:latest + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Run Hadolint + run: | + docker run --rm -i ghcr.io/hadolint/hadolint < Dockerfile diff --git a/.gitignore b/.gitignore index 2654392b..cf5abb12 100644 --- a/.gitignore +++ b/.gitignore @@ -136,6 +136,7 @@ dmypy.json # models models/ +!models/.keep !models/README.md # Temporary files diff --git a/Change Log.md b/CHANGELOG.md similarity index 100% rename from Change Log.md rename to CHANGELOG.md diff --git a/Dockerfile b/Dockerfile index 673bcd5f..bcb18e43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ FROM python:3.10 WORKDIR /srv COPY ./requirements.txt . -RUN python3.10 -m venv env -RUN . env/bin/activate -RUN python3.10 -m pip install -r requirements.txt --upgrade pip +RUN python3 -m venv venv && . venv/bin/activate +RUN python3 -m pip install --no-cache-dir -r requirements.txt --upgrade pip COPY ./app.py /srv/app.py COPY ./static /srv/static COPY ./templates /srv/templates +COPY ./models /srv/models CMD ["python", "app.py", "--host", "0.0.0.0", "--port", "4685", "--db_path", "data/database.db"] diff --git a/models/.keep b/models/.keep new file mode 100644 index 00000000..e69de29b diff --git a/requirements.txt b/requirements.txt index c02e5403..a3275191 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ flask nomic pytest -pyllamacpp \ No newline at end of file +pyllamacpp