CI: fix sim/docs scons cache invalidation (#29639)

* fix sim and docs images

* fix that

* that's a weird issue

* exists should work fine

* as little diff as possible
old-commit-hash: 5716dfc9b5
beeps
Justin Newberry 2 years ago committed by GitHub
parent 875b160fc6
commit ffddeace6e
  1. 8
      docs/docker/Dockerfile
  2. 45
      tools/sim/Dockerfile.sim

@ -2,7 +2,7 @@ FROM ghcr.io/commaai/openpilot-base:latest
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
ENV OPENPILOT_PATH /home/batman/openpilot/ ENV OPENPILOT_PATH /tmp/openpilot
ENV PYTHONPATH ${OPENPILOT_PATH}:${PYTHONPATH} ENV PYTHONPATH ${OPENPILOT_PATH}:${PYTHONPATH}
ENV POETRY_VIRUALENVS_CREATE false ENV POETRY_VIRUALENVS_CREATE false
@ -15,8 +15,8 @@ COPY ./openpilot ${OPENPILOT_PATH}/openpilot
COPY ./body ${OPENPILOT_PATH}/body COPY ./body ${OPENPILOT_PATH}/body
COPY ./third_party ${OPENPILOT_PATH}/third_party COPY ./third_party ${OPENPILOT_PATH}/third_party
COPY ./site_scons ${OPENPILOT_PATH}/site_scons COPY ./site_scons ${OPENPILOT_PATH}/site_scons
COPY ./laika ${OPENPILOT_PATH}/laika
COPY ./laika_repo ${OPENPILOT_PATH}/laika_repo COPY ./laika_repo ${OPENPILOT_PATH}/laika_repo
RUN ln -s ${OPENPILOT_PATH}/laika_repo ${OPENPILOT_PATH}/laika
COPY ./rednose ${OPENPILOT_PATH}/rednose COPY ./rednose ${OPENPILOT_PATH}/rednose
COPY ./rednose_repo ${OPENPILOT_PATH}/rednose_repo COPY ./rednose_repo ${OPENPILOT_PATH}/rednose_repo
COPY ./tools ${OPENPILOT_PATH}/tools COPY ./tools ${OPENPILOT_PATH}/tools
@ -29,7 +29,7 @@ COPY ./selfdrive ${OPENPILOT_PATH}/selfdrive
COPY ./system ${OPENPILOT_PATH}/system COPY ./system ${OPENPILOT_PATH}/system
COPY ./*.md ${OPENPILOT_PATH}/ COPY ./*.md ${OPENPILOT_PATH}/
RUN --mount=type=bind,source=.ci_cache/scons_cache,target=/tmp/scons_cache,rw scons -j$(nproc) RUN --mount=type=bind,source=.ci_cache/scons_cache,target=/tmp/scons_cache,rw scons -j$(nproc) --cache-readonly
RUN apt update && apt install doxygen -y RUN apt update && apt install doxygen -y
COPY ./docs ${OPENPILOT_PATH}/docs COPY ./docs ${OPENPILOT_PATH}/docs
@ -38,5 +38,5 @@ WORKDIR ${OPENPILOT_PATH}/docs
RUN make html RUN make html
FROM nginx:1.21 FROM nginx:1.21
COPY --from=0 /home/batman/openpilot/build/docs/html /usr/share/nginx/html COPY --from=0 /tmp/openpilot/build/docs/html /usr/share/nginx/html
COPY ./docs/docker/nginx.conf /etc/nginx/conf.d/default.conf COPY ./docs/docker/nginx.conf /etc/nginx/conf.d/default.conf

@ -9,26 +9,29 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN cd $HOME && \ RUN cd $HOME && \
curl -O https://raw.githubusercontent.com/commaai/eon-neos-builder/master/devices/eon/home/.tmux.conf curl -O https://raw.githubusercontent.com/commaai/eon-neos-builder/master/devices/eon/home/.tmux.conf
ENV PYTHONPATH $HOME/openpilot:${PYTHONPATH} ENV OPENPILOT_PATH /tmp/openpilot
RUN mkdir -p $HOME/openpilot ENV PYTHONPATH ${OPENPILOT_PATH}:${PYTHONPATH}
COPY SConstruct $HOME/openpilot/ RUN mkdir -p ${OPENPILOT_PATH}
WORKDIR ${OPENPILOT_PATH}
COPY ./openpilot $HOME/openpilot/openpilot
COPY ./body $HOME/openpilot/body COPY SConstruct ${OPENPILOT_PATH}
COPY ./third_party $HOME/openpilot/third_party
COPY ./site_scons $HOME/openpilot/site_scons COPY ./openpilot ${OPENPILOT_PATH}/openpilot
COPY ./rednose $HOME/openpilot/rednose COPY ./body ${OPENPILOT_PATH}/body
COPY ./laika $HOME/openpilot/laika COPY ./third_party ${OPENPILOT_PATH}/third_party
COPY ./common $HOME/openpilot/common COPY ./site_scons ${OPENPILOT_PATH}/site_scons
COPY ./opendbc $HOME/openpilot/opendbc COPY ./rednose ${OPENPILOT_PATH}/rednose
COPY ./cereal $HOME/openpilot/cereal COPY ./laika_repo ${OPENPILOT_PATH}/laika_repo
COPY ./panda $HOME/openpilot/panda RUN ln -s ${OPENPILOT_PATH}/laika_repo ${OPENPILOT_PATH}/laika
COPY ./selfdrive $HOME/openpilot/selfdrive COPY ./common ${OPENPILOT_PATH}/common
COPY ./system $HOME/openpilot/system COPY ./opendbc ${OPENPILOT_PATH}/opendbc
COPY ./tools $HOME/openpilot/tools COPY ./cereal ${OPENPILOT_PATH}/cereal
COPY ./panda ${OPENPILOT_PATH}/panda
WORKDIR $HOME/openpilot COPY ./selfdrive ${OPENPILOT_PATH}/selfdrive
RUN --mount=type=bind,source=.ci_cache/scons_cache,target=/tmp/scons_cache,rw scons -j$(nproc) COPY ./system ${OPENPILOT_PATH}/system
COPY ./tools ${OPENPILOT_PATH}/tools
RUN --mount=type=bind,source=.ci_cache/scons_cache,target=/tmp/scons_cache,rw scons -j$(nproc) --cache-readonly
RUN python -c "from openpilot.selfdrive.test.helpers import set_params_enabled; set_params_enabled()" RUN python -c "from openpilot.selfdrive.test.helpers import set_params_enabled; set_params_enabled()"

Loading…
Cancel
Save