2020-10-30 07:51:09 +08:00
|
|
|
FROM ubuntu:20.04
|
2022-01-03 06:47:16 +08:00
|
|
|
|
2020-01-18 02:22:00 +08:00
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
2020-10-30 07:51:09 +08:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2022-01-03 06:47:16 +08:00
|
|
|
RUN apt-get update && \
|
2022-05-14 07:47:55 +08:00
|
|
|
apt-get install -y --no-install-recommends sudo tzdata locales ssh && \
|
2022-01-03 06:47:16 +08:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
2020-01-18 02:22:00 +08:00
|
|
|
|
|
|
|
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US:en
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2022-10-22 07:23:56 +08:00
|
|
|
ENV POETRY_VIRTUALENVS_CREATE=false
|
2023-07-21 12:56:57 +08:00
|
|
|
ENV PYENV_VERSION=3.11.4
|
2022-01-11 03:43:18 +08:00
|
|
|
ENV PYENV_ROOT="/root/.pyenv"
|
|
|
|
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
|
|
|
|
|
2023-08-12 11:05:44 +08:00
|
|
|
COPY pyproject.toml poetry.lock .python-version /tmp/
|
2023-08-22 07:32:35 +08:00
|
|
|
COPY tools/ubuntu_setup.sh tools/install_ubuntu_dependencies.sh tools/install_python_dependencies.sh /tmp/tools/
|
2022-01-03 06:47:16 +08:00
|
|
|
RUN cd /tmp && \
|
|
|
|
tools/ubuntu_setup.sh && \
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
2022-01-11 03:43:18 +08:00
|
|
|
rm -rf /tmp/* && \
|
|
|
|
rm -rf /root/.cache && \
|
2022-10-22 07:23:56 +08:00
|
|
|
pip uninstall -y poetry && \
|
2022-01-11 03:43:18 +08:00
|
|
|
# remove unused architectures from gcc for panda
|
|
|
|
cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \
|
|
|
|
rm -rf arm/ && \
|
|
|
|
rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
|
2022-04-20 20:23:27 +08:00
|
|
|
|
2022-05-14 07:47:55 +08:00
|
|
|
RUN sudo git config --global --add safe.directory /tmp/openpilot
|