From e0d4be4a6215d44809718dc84efe1b9f0299ad63 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 28 Apr 2024 14:04:59 -0700 Subject: [PATCH] update to ubuntu 24.04 (#1037) * update to ubuntu 24.04 * Update .github/workflows/repo.yml * Update tests.yml * Update Dockerfile * bump cereal * no pyenv * python3 dev * vla * python --- .github/workflows/repo.yml | 2 +- .github/workflows/tests.yml | 6 +++--- Dockerfile | 19 ++++++++----------- SConstruct | 1 + 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/repo.yml b/.github/workflows/repo.yml index 122bbb2fc4..f9a961f5ad 100644 --- a/.github/workflows/repo.yml +++ b/.github/workflows/repo.yml @@ -8,7 +8,7 @@ on: jobs: pre-commit-autoupdate: name: pre-commit autoupdate - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest container: image: ghcr.io/commaai/opendbc:latest steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d3719fa27..71486e7415 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ env: jobs: unit-tests: name: unit tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest #strategy: # fail-fast: false # matrix: @@ -26,7 +26,7 @@ jobs: static-analysis: name: static analysis - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build Docker image @@ -41,7 +41,7 @@ jobs: docker-push: name: docker push - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/opendbc' steps: - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index cda26e7229..df3cb56b8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -26,21 +26,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ocl-icd-opencl-dev \ opencl-headers \ tk-dev \ - python-openssl \ + python3-pip \ + python3-dev \ + python3-openssl \ + python-is-python3 \ xz-utils \ zlib1g-dev \ cmake \ && rm -rf /var/lib/apt/lists/* -RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash -ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}" -RUN pyenv install 3.11.4 -RUN pyenv global 3.11.4 -RUN pyenv rehash - COPY requirements.txt /tmp/ -RUN pip install --no-cache-dir -r /tmp/requirements.txt -RUN pip install --no-cache-dir pre-commit==2.15.0 pylint==2.17.4 +RUN pip3 install --break-system-packages --no-cache-dir -r /tmp/requirements.txt +RUN pip3 install --break-system-packages --no-cache-dir pre-commit==2.15.0 pylint==2.17.4 ENV PYTHONPATH=/project @@ -49,7 +46,7 @@ RUN git config --global --add safe.directory '*' WORKDIR /project RUN git clone https://github.com/commaai/cereal.git /project/cereal && \ cd /project/cereal && \ - git checkout a4255106b7255e00ae04162f7aa14aa3cae339c3 && \ + git checkout 861144c136c91f70dcbc652c2ffe99f57440ad47 && \ rm -rf .git && \ scons -j$(nproc) --minimal diff --git a/SConstruct b/SConstruct index c42201fd6f..34e3061e78 100644 --- a/SConstruct +++ b/SConstruct @@ -39,6 +39,7 @@ env = Environment( "-Wunused", "-Werror", "-Wshadow", + "-Wno-vla-cxx-extension", ] + ccflags_asan, LDFLAGS=ldflags_asan, LINKFLAGS=ldflags_asan,