Skip to content
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

Split out openpilot and agnos python dependencies #265

Merged
merged 29 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2c60e63
make openpilot a dependency of agnos
andiradulescu Jul 26, 2024
6581b65
cleaner curls [upload]
andiradulescu Jul 26, 2024
1742d17
adding required dbus-python and pyopencl [upload]
andiradulescu Jul 26, 2024
90c46a7
Merge branch 'master' into agnos-pydep-on-openpilot
andiradulescu Sep 3, 2024
5f17285
check in openpilot pyproject.toml and uv.lock
andiradulescu Sep 3, 2024
aed6611
ignore openpilot uv.lock
andiradulescu Sep 3, 2024
73867a1
remove allow-direct-references
andiradulescu Sep 3, 2024
2b7bb88
codespell: ignore openpilot python deps folder
andiradulescu Sep 3, 2024
a441ac2
use a uv workspace instead
andiradulescu Sep 3, 2024
3f3dd71
codespell: ignore uv folder
andiradulescu Sep 3, 2024
03e3a93
uv lock in sync
Sep 3, 2024
a2db985
Merge branch 'master' into agnos-pydep-on-openpilot
andiradulescu Sep 3, 2024
fb49518
agnos optional deps are never installed
andiradulescu Sep 3, 2024
b8acb98
uv temp fix for dbus-python error
andiradulescu Sep 3, 2024
0a70a9a
uv agnos virtual
andiradulescu Sep 3, 2024
2b3e3ea
update openpilot pyproject.toml
andiradulescu Sep 3, 2024
2df4795
also install openpilot testing
andiradulescu Sep 3, 2024
8377750
sourcing is needed [upload]
andiradulescu Sep 3, 2024
b2161de
[upload]
andiradulescu Sep 3, 2024
93030b0
update openpilot uv.lock
Sep 4, 2024
8aee340
fix wrong env for uv sync
Sep 4, 2024
992ecbe
added openpilot[testing]
Sep 4, 2024
0a0c707
openpilot uv.lock is now workspace uv.lock
Sep 4, 2024
ade422a
[upload]
Sep 4, 2024
ef4fa8a
no more uv.lock download
Sep 4, 2024
6220ba3
new uv.lock
Sep 4, 2024
b377aa8
openpilot[dev] + uv lock --upgrade
Sep 4, 2024
045aa12
Merge branch 'master' into agnos-pydep-on-openpilot
Sep 4, 2024
7d85c97
[upload]
Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
rev: v2.2.4
hooks:
- id: codespell
exclude: '^(userspace/files/serviceproviders.xml)|(tools/)|(userspace/uv.lock)'
exclude: '^(userspace/files/serviceproviders.xml)|(tools/)|(userspace/uv/)'
args:
# if you've got a short variable name that's getting flagged, add it here
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile.agnos
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
uv pip install /tmp/PyQt5-5.15.9-cp38-abi3-manylinux_2_17_aarch64.whl --verbose --config-settings="--confirm-license="

# Install openpilot python packages
RUN mkdir -p /tmp/agnos/uv
COPY ./userspace/pyproject.toml ./userspace/uv.lock /tmp/agnos/uv
COPY ./userspace/uv /tmp/agnos/uv
RUN source $XDG_DATA_HOME/venv/bin/activate && \
cd /tmp/agnos/uv && \
export PYOPENCL_CL_PRETEND_VERSION="2.0" && \
Expand All @@ -110,7 +109,9 @@ RUN source $XDG_DATA_HOME/venv/bin/activate && \
sed -i 's|prefix=/install|prefix='$pc'|' $pypcpath && \
pypcpathembed=$pcpath"/python-3.12-embed.pc" && \
sed -i 's|prefix=/install|prefix='$pc'|' $pypcpathembed && \
MAKEFLAGS="-j$(nproc)" UV_NO_CACHE=1 uv pip install --no-cache-dir .
export MAKEFLAGS="-j$(nproc)" && export UV_NO_CACHE=1 && \
export UV_PROJECT_ENVIRONMENT=$XDG_DATA_HOME/venv && \
uv sync --frozen

# Install nice to haves
COPY ./userspace/install_extras.sh /tmp/agnos/
Expand Down
16 changes: 16 additions & 0 deletions sync_openpilot_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e

# Make sure we're in the correct spot
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR

cd userspace/uv
curl -sSo openpilot/pyproject.toml https://raw.githubusercontent.com/commaai/openpilot/master/pyproject.toml
curl -sSo uv.lock https://raw.githubusercontent.com/commaai/openpilot/master/uv.lock
andiradulescu marked this conversation as resolved.
Show resolved Hide resolved

export PYOPENCL_CL_PRETEND_VERSION="2.0" && \
pc="$(python -c "import sysconfig;print(sysconfig.get_config_vars('installed_base')[0])")" && \
pcpath=$pc"/lib/pkgconfig" && \
export PKG_CONFIG_PATH="$pcpath:$PKG_CONFIG_PATH" && \
uv lock
114 changes: 0 additions & 114 deletions userspace/pyproject.toml

This file was deleted.

2,946 changes: 0 additions & 2,946 deletions userspace/uv.lock

This file was deleted.

Loading