-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to uv and hatch (#188)
* chore: migrate to uv and hatch * chore: revert to pypa upload action, uv publish is still experimental * docs: document uv usage in DEVELOPMENT.md * chore: review comments * chore: move version comment to DEVELOPMENT.md instead
- Loading branch information
Showing
12 changed files
with
2,057 additions
and
119 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
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
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
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 @@ | ||
3.10 |
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 |
---|---|---|
@@ -1,15 +1,28 @@ | ||
FROM python:3.12-slim AS build | ||
ENV PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
UV_PROJECT_ENVIRONMENT=/usr/local/ | ||
WORKDIR /build | ||
COPY --from=ghcr.io/astral-sh/uv:0.4.29 /uv /uvx /bin/ | ||
|
||
COPY pyproject.toml uv.lock ./ | ||
|
||
RUN uv sync --frozen --no-install-project --no-dev | ||
|
||
FROM python:3.12-slim | ||
ENV PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONUNBUFFERED=1 | ||
PYTHONUNBUFFERED=1 | ||
WORKDIR /app | ||
|
||
RUN useradd -ms /bin/bash pgaiuser | ||
|
||
COPY ./requirements.txt /app/ | ||
RUN pip3 install --no-cache-dir --disable-pip-version-check --compile --root-user-action=ignore -r requirements.txt | ||
# Copy installed dependencies from build stage | ||
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages | ||
|
||
USER pgaiuser | ||
COPY pyproject.toml /app | ||
COPY pyproject.toml /app/ | ||
COPY pgai /app/pgai | ||
|
||
USER pgaiuser | ||
|
||
ENTRYPOINT ["python", "-m", "pgai", "vectorizer", "worker"] | ||
CMD ["-c", "4"] | ||
CMD ["-c", "4"] |
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.