Commit Graph

26 Commits

Author SHA1 Message Date
Jason Wen
f3c4501db1 docker: sunnypilot images (#1104)
* docker: sunnypilot images

* update ref for now

* update

* actually nightly

* rename

* enable now

* revert
2025-08-02 01:15:07 -04:00
Jason Wen
70f8225efc Merge branch 'upstream/openpilot/master' into sync-20250312
# Conflicts:
#    opendbc_repo
#    selfdrive/car/tests/test_models.py
2025-03-13 02:41:16 -04:00
Adeeb Shihadeh
96641ac12c no gh actions in release 2025-03-12 14:56:40 -07:00
Jason Wen
afde2771f8 Merge branch 'upstream/openpilot/master' into sync-20250116
# Conflicts:
#    .github/workflows/ui_preview.yaml
#    opendbc_repo
#    panda
#    release/release_files.py
#    selfdrive/test/process_replay/ref_commit
#    selfdrive/ui/tests/test_ui/run.py
2025-01-16 17:12:53 -05:00
Adeeb Shihadeh
57abd8b0c2 Remove release files (conceptually) (#34379)
* Remove release files (conceptually)

* fix
2025-01-13 19:31:21 -08:00
DevTekVE
0bfa9fca88 SP: GitHub runner as service and able to toggle via developer panel (#494)
* Add support for GitHub Actions runner management

Introduce a new process and configuration to manage a GitHub Actions runner. Added a persistent "EnableGithubRunner" parameter and a script to control the runner service. Integrated the feature into the system's process manager logic.

* Restrict GitHub runner usage on metered networks.

This update modifies the `use_github_runner` function to include a check for metered networks using `HARDWARE.get_network_metered()`. This ensures the GitHub runner is not enabled when the network is metered, improving network usage efficiency.

* Add GitHub runner service toggle to developer panel

Introduces a new toggle in the developer panel to enable or disable the GitHub runner service. This provides developers with a convenient way to control the service from the UI.

* translations

* Refactor network condition check for GitHub runner.

Updated `use_github_runner` to include network type in metered network checks. This ensures more accurate validation by considering specific network types when determining metered status.

* Mark as executable

* Update paths and shebangs for consistency across scripts

Modified file paths to align with the new directory structure under `/data/media/0/github` and updated the shebang in `github_runner.sh` for better environment compatibility. Adjusted the `BUILD_DIR` in the GitHub workflow to reflect the new path.

* Fix string translation for GitHub runner parameter text

Added translation support for the GitHub runner service description text. This ensures consistent localization across the UI.

* Remove gitlab_runner.sh from Sunnypilot blacklist.

The script is no longer required to be blacklisted, likely due to updates or changes in its usage. This improves the maintainability of the blacklist by removing unnecessary entries.

* lang stuff

* Update BASE_DIR determination based on mount point

Refactored scripts to dynamically set BASE_DIR depending on whether /data/media is a valid mount point. This ensures compatibility with different environments and improves robustness of path resolution.

* Refactor GitHub runner logic in process_config.

Simplified enabling conditions for the GitHub runner by removing dependency on hardware network checks and adding a logical combination of offroad and runner-related functions. This improves code readability and reduces hardware coupling.
2024-12-23 09:19:26 +01:00
DevTekVE
ad537fcb89 CI: Build prebuilts and models from github and self hosted runners (#476)
* Create a GitHub Actions workflow for synchronizing the repository to GitLab and enhance GitLab CI settings

A new GitHub Actions workflow for mirroring the current repository to GitLab is added. This workflow is triggered by both push and delete events in addition to manual triggering. The role of GitHub actions runner is defined through a series of steps. A new '.gitlab-ci.yml' build configuration file is also introduced, with a more comprehensive definition of variables, jobs, and pipeline rules for its utilization in the GitLab CI/CD pipeline.

Further, other changes include the addition of scripts for installing and uninstalling GitLab CI runner, along with modifying the SCons build system configuration file to include custom cache directory. Moreover, 'release_files.py' has been revised to include additional blacklisted and whitelisted files specific to Sunnypilot, ensuring suitable settings for the CI flow.

The improvements facilitate a smoother integration between GitHub and GitLab, powerfully harnessing the capabilities of both platforms for more efficient and effective CI/CD pipelines and version control management.

* not needed for this

* Update workflow to build model from upstream repository

Revised the CI workflow to build directly from the upstream `commaai/openpilot` repository. Simplified configuration, removed unused steps, and added support for specifying the upstream branch dynamically via inputs.

* Update SConstruct to allow passing arbitrary cache_dir

Modified the SConstruct file to enable setting a custom cache directory via arguments. This enhances flexibility in configuring cache paths during the build process.

* Refactor build workflow to improve branch handling logic.

Reorganized conditions for setting environment variables, replacing repository_dispatch with workflow_dispatch for prebuilt builds. Added a fallback error message for unsupported triggers to improve robustness. This enhances clarity and ensures compatibility with the intended workflow triggers.

* test test test

* test test test

* test test test

* Enable publication flag during build configurations

Added `SHOULD_PUBLISH=true` to all relevant build configuration steps to ensure proper handling of publishing logic. Updated environment variables to include this flag for downstream usage. Removed the error-check step for unsupported configurations.

* Simplify publish condition in workflow logic

Replaced the previous condition for publishing with a single output variable, `should_publish`, to streamline logic and improve maintainability. This change reduces redundancy and makes the workflow more adaptable to future updates.

* Simplify restore key patterns in build workflow.

Removed unnecessary trailing dashes in SCons cache restore keys to streamline and slightly improve key matching logic. This ensures better consistency with the current workflow setup.

* Update cache key usage in build workflow

Replaced `github.ref_name` with `github.head_ref` for cache keys to ensure accurate branch-specific caching. Added fallback restore-keys for master branches to improve cache efficiency and reduce redundant builds.

* Improved debug logging in GitHub actions workflow

This commit refines the debug logging in our GitHub Actions workflow for the Sunnypilot build. This change provides more granularity, enabling logging only during debug mode, which helps to keep the runtime logs less cluttered during normal operations. This includes the conditionally displaying of environmental variables, GitHub output contents, and directory listings.

Additionally, debug mode verbosity was added to rsync commands to aid troubleshooting file transfers during the build process.

Blank lines were also reduced for better readability and cleaner code presentation.

* test diff path

* Refactor SCons cache handling in build workflow

Replaced hardcoded cache directory paths with an environment variable (`SCONS_CACHE_DIR`) for better maintainability and flexibility. Updated related workflow steps to utilize the new variable and adjusted cache key usage. Removed unused `BASE_BUILD_NUMBER` variable to clean up the configuration.

* Update cache key to include commit SHA in workflow

This change adds the commit SHA to the cache key in the GitHub Actions workflow. It ensures more precise caching by differentiating builds based on the specific commit, reducing potential conflicts.

* clean

Update GitHub runner service to set environment variables

Updated the ExecStart command to explicitly set HOME, USER, LOGNAME, and MAIL environment variables. This ensures the runner operates with the correct environment configuration, improving reliability and compatibility.

Refactor GitHub runner service ExecStart command.

Replaced direct command execution with running the service as a specific user using `su`. This improves compatibility and aligns with best practices for user-based execution. No functional changes are expected.

Update GitHub runner service to set environment variables

The ExecStart command now sets HOME, USER, LOGNAME, and MAIL environment variables for the runner process. This ensures proper environment initialization for the designated user, improving compatibility and reliability during execution.

Refactor GitHub runner service template handling.

Revised the `modify_service_template` function to create a properly structured service template for the GitHub runner. Updated service permissions, execution parameters, and enabled the function call to ensure usage during runner setup.

* Refactor GitHub Runner installer to improve argument parsing.

Reworked the script to implement flexible and explicit command-line argument parsing using flags like `--token`, `--repo`, and `--start-at-boot`. Added support for setting default values and enabling/disabling auto-start based on the `--start-at-boot` flag. Improved error handling and usage messaging for better user experience.

* Update cache keys in sunnypilot build workflow

Modified the cache keys to include `github.ref_name` for more precise caching and restore behavior. This improves build consistency by better differentiating between branches and refs. No changes to the overall workflow logic.

* Remove 'tinygrad/*' from release file exclusions

This change modifies the release file exclusions by removing 'tinygrad/*'. The adjustment ensures that files in the 'tinygrad' directory are now included in the release process, aligning with updated packaging requirements.

* Simplify release file exclusions list.

Removed redundant and unnecessary file patterns from the exclusions list in `release_files.py`. This streamlines the file handling process and reduces maintenance overhead.

* Refactor SCons cache path and key structure.

Updated the SCons cache directory path to `SCONS_CACHE_DIR` for clarity and consistency. Improved the caching key structure to include `github.head_ref` for better cache differentiation and restore hierarchy. Adjusted related build instructions to reflect the new environment variable.

* Refactor branch configuration in CI workflow

Standardize branch name handling by replacing hardcoded values with environment variables. This improves maintainability and simplifies updates to branch names across the workflow. Updated references to use the new dynamic environment variable approach.
2024-12-21 20:19:48 +01:00
Harald Schäfer
17ca6389e1 Tinygrad runner (#34261)
* squash

* dmonitoringmodeld: use cl transform (#34235)

* needs cleanup

* only if tici

* bump tinygrad

* check width

* base modelframe

* .

* need to be args

* more cleanup

* no _frame in base

* tici only

* its DrivingModelFrame

* .6 is fair

---------

Co-authored-by: Comma Device <device@comma.ai>

* Update tinygrad

* tg upstream

* bump tg

* bump tg

* debug

* attr

* misc cleanup

* whitespace

* remove

* Add TODOs to make python proc for modelrunners

* whitespace

---------

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-12-18 11:58:59 -08:00
Harald Schäfer
f6885dcbec Revert Tinygrad (#34243)
* Revert "dmonitoringmodeld: use cl transform (#34235)"

This reverts commit 684b0b9d4d.

* Revert "load model before calling convert_fp16_to_fp32"

This reverts commit 31606a7d15.

* Revert "bump tinygrad"

This reverts commit 44f58ff758.

* Revert "Tinygrad runner (#34171)"

This reverts commit 7b5a4fbb03.

* Allow init buffer

* typo
2024-12-14 12:15:36 -08:00
Harald Schäfer
7b5a4fbb03 Tinygrad runner (#34171)
* squash

* bump tg

* bump tg

* debump tinygrad

* bump tinygrad

* bump tg

* Skip init iteration

* fixes

* cleanups

* skip first test sample

* typos

* linter unhappy

* update cpu usage

* OPENCL just zeros for now

* imports

* Try printing

* Runs again, but slower

* unused import

* Allow more buffer with tg and all on gpu

* bump tinygrad

* seems ok

* stricter timings for driving looser for dm

* try llvm

* check nvidia

* More timeout for now

* make test pass

* Revert "try llvm"

This reverts commit ef136e478320101fea262bae3579e558da991902.

* small fixes

* whitespace

* revert test timeout

* No model runners

* Always CPU always fast

* No onnx runtime GPU

* more cores

* cleanup

* Is this faster

* Is this faster

* at least runs

* FP32 is faster than 16

* fix deps

* whitespace

* comment

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-12-11 23:15:20 -08:00
Maxime Desroches
7558108221 delete devcontainer (#34181)
* remove

* Update tools/README.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-12-07 20:39:30 -08:00
Adeeb Shihadeh
d9d57e5d6f Revert ISP image processing + tinygrad bump (#34020)
* Revert "Replace ThneedModel with TinygradModel (#33532)"

This reverts commit da952e9b64.

* Revert "camerad: move E + D cams image pipelines to the IFE (#33959)"

This reverts commit f2a1cce42b.
2024-11-13 19:27:11 -08:00
Mitchell Goff
da952e9b64 Replace ThneedModel with TinygradModel (#33532)
* squash

* bump tg

* bump tg

* debump tinygrad

* bump tinygrad

* bump tg

* Skip init iteration

* fixes

* cleanups

* skip first test sample

* typos

* linter unhappy

* update cpu usage

* OPENCL just zeros for now

* imports

* Try printing

* Runs again, but slower

* unused import

* Allow more buffer with tg and all on gpu

* bump tinygrad

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2024-11-11 13:32:21 -08:00
Shane Smiskol
82f8db87f4 add longitudinal maneuvers (#33527)
* add longitudinal profiles

* stash

* unfortunately even longitudinalPlan causes circle

* add to process config

* reach target speed smoothly

* stash

* works

* clean up

* debug alert

* rename

* fix

* better text

* toggle via exp button

* try coming to a stop better, smoother target reaching

* closer to target

* revert controlsd migration

* add description to alert

* generate report from local logs

* hide bad maneuvers

* pdflike

* Revert "pdflike"

This reverts commit 6d4af1bf9be2e9e0798eaecf026a53d860da7613.

* try this

* use alert manager

* fix that check

* wat

* Revert "wat"

This reverts commit 93d0d27ab838d3f580d06ff212f380e0b912d599.

* some clean up

* rm

* cleanup

* move

* fix test

* more fix

* clean up

* fix that
2024-09-12 14:10:18 -07:00
Shane Smiskol
d73a787e8a release files: add tools/joystick (#33525) 2024-09-09 12:03:34 -07:00
Shane Smiskol
f8ef09fcb2 rm tesla (#33300)
* rm tesla

* more rm

* ugh we should remove dynamic imports soon
old-commit-hash: b9dec5e3b5
2024-08-14 15:06:00 -07:00
Adeeb Shihadeh
1feb6d671a remove pre-commit (explorations) (#33172)
* remove pre-commit (explorations)

* lint.sh

* remove rest

* add to release files

* no source

* 1min is all you need
old-commit-hash: 13511e383c
2024-08-01 22:16:13 -07:00
Shane Smiskol
54f912a1d5 opendbc is a package (#33159)
* bump

* rename to opendbc_repo

add symlink

* bump

* fix cabana

fix cabana

* bump

* fix whitelist paths

bump

* bump to master

* remove trailing slash
old-commit-hash: 7ee9d2d1b9
2024-07-31 23:17:40 -07:00
Adeeb Shihadeh
a2667533c9 remove body submodule (#33091)
* remove body submodule

* little more

* fix op
old-commit-hash: d24b80fca4
2024-07-26 14:40:14 -07:00
Maxime Desroches
a1a0e9e8a0 switch to uv (#32853)
* switch to uv

* pin back numpy

* remove lock

* try without cache

* test with no cache

* no cache for all

* debug

* remove debug

* remove pygame dep

* Update README.md

* remove lower bound

* update repo maintenance job

* upgradable

* repo maintenance

* copy poetry api

* build system

* unpin pygame

* readd cache

* readd cache

* basic command

* lower delay

* macos

* fix authors

* macos fix

* use uv

* preview

* other way

* new metadrive

* uv sync

* cp lock in docker

* fix docker

* use hatchling

* fix devcontainer

* fix container

* path

* uv run

* cleanup

* pre-commit

* format

* release_file
old-commit-hash: 12d5afba73
2024-06-28 00:04:05 +00:00
Adeeb Shihadeh
669888878d little more release blacklist
old-commit-hash: c2be8a5553
2024-06-11 11:29:39 -07:00
Adeeb Shihadeh
dc9e0a3b39 blacklist more files from release (#32616)
* blacklist more files from release

* dbcs

* fix

* just use the lfs

* rm that too

* cleanup

* cleanup
old-commit-hash: 5c3c06dfdf
2024-06-07 15:26:55 -07:00
Adeeb Shihadeh
c81003870b add body teleop to release
old-commit-hash: ce2a686b97
2024-06-01 16:04:04 -07:00
Adeeb Shihadeh
4b5291b1be more release files
old-commit-hash: 7de9a3693f
2024-06-01 15:16:09 -07:00
Adeeb Shihadeh
27d7d5de21 no lfs in release
old-commit-hash: a21f773366
2024-06-01 14:23:48 -07:00
Adeeb Shihadeh
6dc8eecee7 Make release files a blacklist (#32540)
* blacklist

* little nicer

* whitelist

* cleanup

* igore body

* more skip
old-commit-hash: fe7d3429ab
2024-05-25 18:47:16 -07:00