Skip to content

Commit

Permalink
feat(ci): pdm and hatchling (#4056)
Browse files Browse the repository at this point in the history
Co-authored-by: Frost Ming <[email protected]>
  • Loading branch information
aarnphm and frostming authored Jul 20, 2023
1 parent b61b118 commit d4c5908
Show file tree
Hide file tree
Showing 52 changed files with 8,384 additions and 1,503 deletions.
5 changes: 2 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ RUN --mount=type=cache,target=/var/lib/apt \
# Clean up
&& rm -rf /var/lib/apt/lists/* /tmp/library-scripts/

COPY requirements/*.txt /tmp/pip-tmp/
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --no-warn-script-location -r /tmp/pip-tmp/dev-requirements.txt -r /tmp/pip-tmp/docs-requirements.txt \
&& rm -rf /tmp/pip-tmp && pre-commit install
pip install --no-warn-script-location pdm \
&& pre-commit install && pdm sync -dG testing -G tooling

# Setting the ENTRYPOINT to docker-init.sh will configure non-root access to
# the Docker socket if "overrideCommand": false is set in devcontainer.json.
Expand Down
5 changes: 3 additions & 2 deletions .devcontainer/lifecycle/post-start
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ git config --global pull.ff only
# fetch all tags
git fetch upstream --tags && git pull

# install editable wheels & tools for bentoml
pip install -e ".[tracing,grpc]" -r requirements/dev-requirements.txt
curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -

~/.local/bin/pdm sync -gp . -d -G io -G grpc -G triton -G tracing -G monitor-otlp -G grpc-reflection -G grpc-channelz -G aws

# setup docker buildx
docker buildx install
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
typings/**/*.pyi linguist-generated=true
*_pb2*.py linguist-generated=true
*_pb2*.pyi linguist-generated=true
pdm.lock linguist-generated=true
* text=auto eol=lf
Loading

0 comments on commit d4c5908

Please sign in to comment.