-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/ab#2121 use cvbase update visionapi #37
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6531b3e
Remove boxmot dependency (extract OcSort impl); Update visionapi to 3…
flonix8 bdf3f68
Update to Python 3.13; Remove config option for DeepOCSort; Update de…
flonix8 ed6a75a
Update dependencies
flonix8 e9c184c
Update GHA workflows
flonix8 4d701f6
Improve docker build (reduce image size)
flonix8 a119ece
Optimize docker build
flonix8 3b26c0a
Update changelog
flonix8 adc382f
Readd non-root user to Dockerfile
flonix8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -10,4 +10,5 @@ cache | |
| !.github/workflows/*.yaml | ||
| !settings.template.yaml | ||
| target | ||
| dist | ||
| dist | ||
| requirements.txt | ||
This file contains hidden or 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,35 +1,36 @@ | ||
| FROM starwitorg/base-python-image:0.0.15 AS build | ||
| # You must run `poetry export` before building this | ||
| FROM python:3.13-slim AS build | ||
|
|
||
| ADD "https://drive.google.com/uc?id=1Kkx2zW89jq_NETu4u42CFZTMVD5Hwm6e" /code/osnet_x0_25_msmt17.pt | ||
|
|
||
|
|
||
| # Copy only files that are necessary to install dependencies | ||
| COPY poetry.lock poetry.toml pyproject.toml /code/ | ||
| RUN apt update && apt install --no-install-recommends -y \ | ||
| build-essential \ | ||
| git | ||
|
|
||
| WORKDIR /code | ||
| RUN poetry install | ||
|
|
||
| # Copy the rest of the project | ||
| COPY . /code/ | ||
| # This needs to be generated with poetry export | ||
| COPY requirements.txt ./ | ||
|
|
||
| RUN pip wheel --no-cache-dir --no-deps -r requirements.txt -w /wheels | ||
|
|
||
| ### Main artifact / deliverable image | ||
| FROM python:3.13-slim | ||
|
|
||
| FROM python:3.12-slim | ||
| RUN apt update && apt install --no-install-recommends -y \ | ||
| libglib2.0-0 \ | ||
| libgl1 \ | ||
| libturbojpeg0 | ||
| libturbojpeg0 \ | ||
| git | ||
|
|
||
| # Create a non-root user and group | ||
|
flonix8 marked this conversation as resolved.
|
||
| RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser | ||
|
|
||
| COPY --from=build --chown=appuser:appgroup /code /code | ||
|
|
||
| WORKDIR /code | ||
|
|
||
| # Switch to non-root user | ||
| USER appuser | ||
| # This needs to be generated with poetry export (same file as above) | ||
| COPY requirements.txt ./ | ||
|
|
||
| # This should be fine if and only if the wheels are generated based on the poetry exported requirements.txt (see above) | ||
| RUN --mount=type=bind,from=build,source=/wheels,target=/wheels \ | ||
| pip install /wheels/* | ||
|
|
||
| ENV PATH="/code/.venv/bin:$PATH" | ||
| COPY --chown=appuser:appgroup main.py ./ | ||
| COPY --chown=appuser:appgroup ./objecttracker ./objecttracker | ||
|
|
||
| USER appuser | ||
| CMD [ "python", "main.py" ] | ||
This file contains hidden or 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 hidden or 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,3 +1,8 @@ | ||
| #!/bin/bash | ||
|
|
||
| docker build -t starwitorg/sae-object-tracker:local . | ||
| poetry export -o requirements.txt --without-hashes | ||
|
|
||
| docker build -t starwitorg/sae-object-tracker:local . | ||
|
|
||
| # Run with other components from the SAE compose project (set redis host to `redis`): | ||
| # `docker run -it --rm --network sae -v $(pwd)/settings.yaml:/code/settings.yaml starwitorg/sae-object-tracker:local` |
This file contains hidden or 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,5 @@ | ||
| # This package consists of the entire OCSort implementation from "boxmot==13.0.8" by Mikel Brostrom | ||
| # in an effort to reduce dependencies. All code that is not needed has been removed. Original file names have been preserved. | ||
| # The original boxmot project can be found here: https://github.com/mikel-brostrom/boxmot | ||
|
|
||
| from .ocsort import OcSort |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.