mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
more progress
This commit is contained in:
parent
fcd1fa7468
commit
ab95391057
@ -115,6 +115,10 @@ FROM base AS wheels
|
||||
ARG DEBIAN_FRONTEND
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN --mount=type=bind,source=docker/tensorrt/install_python_39.sh,target=/deps/install_python_39.sh \
|
||||
--mount=type=cache,target=/root/.ccache \
|
||||
/deps/install_python_39.sh
|
||||
|
||||
# Use a separate container to build wheels to prevent build dependencies in final image
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y \
|
||||
@ -128,8 +132,6 @@ RUN apt-get -qq update \
|
||||
tee /etc/apt/sources.list.d/debian-bullseye-nonfree.list \
|
||||
&& apt-get -qq update \
|
||||
&& apt-get -qq install -y \
|
||||
python3.9 \
|
||||
python3.9-dev \
|
||||
# opencv dependencies
|
||||
build-essential cmake git pkg-config libgtk-3-dev \
|
||||
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
|
||||
@ -142,7 +144,7 @@ RUN apt-get -qq update \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Ensure python3 defaults to python3.9
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
# RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
|
||||
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
|
||||
&& python3 get-pip.py "pip"
|
||||
|
||||
@ -4,13 +4,28 @@ set -euxo pipefail
|
||||
|
||||
apt-get -qq update
|
||||
|
||||
if [ -e /usr/local/cuda-12.2 ]; then
|
||||
apt-get update && \
|
||||
apt-get install wget build-essential ccache clang cmake pkg-config -y
|
||||
|
||||
wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
|
||||
tar -xf Python-3.9.6.tgz
|
||||
cd Python-3.9.6
|
||||
./configure --enable-optimizations
|
||||
make altinstall
|
||||
else
|
||||
apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends \
|
||||
python3.9 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
fi
|
||||
|
||||
apt-get -qq install --no-install-recommends -y \
|
||||
apt-transport-https \
|
||||
gnupg \
|
||||
wget \
|
||||
procps vainfo \
|
||||
unzip locales tzdata libxml2 xz-utils \
|
||||
python3.9 \
|
||||
python3-pip \
|
||||
curl \
|
||||
jq \
|
||||
|
||||
@ -8,14 +8,17 @@ FROM ${BASE_IMAGE} AS build-wheels
|
||||
ARG DEBIAN_FRONTEND
|
||||
|
||||
# Use a separate container to build wheels to prevent build dependencies in final image
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends \
|
||||
python3.9 python3.9-dev \
|
||||
wget build-essential cmake git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN --mount=type=bind,source=docker/tensorrt/install_python_39.sh,target=/deps/install_python_39.sh \
|
||||
--mount=type=cache,target=/root/.ccache \
|
||||
/deps/install_python_39.sh
|
||||
#RUN apt-get -qq update \
|
||||
# && apt-get -qq install -y --no-install-recommends \
|
||||
# python3.9 python3.9-dev \
|
||||
# wget build-essential cmake git \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Ensure python3 defaults to python3.9
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
# RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
|
||||
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
|
||||
&& python3 get-pip.py "pip"
|
||||
|
||||
@ -27,13 +27,7 @@ if [ -e /usr/local/cuda-12.2 ]; then
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install nvidia-l4t-jetson-multimedia-api -y
|
||||
|
||||
wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
|
||||
tar -xf Python-3.9.6.tgz
|
||||
cd Python-3.9.6
|
||||
./configure --enable-optimizations
|
||||
sudo make altinstall
|
||||
apt-get install nvidia-l4t-jetson-multimedia-api -o Dpkg::Options::="--force-confold" --force-yes -y
|
||||
elif [ -e /usr/local/cuda-10.2 ]; then
|
||||
# assume Jetpack 4.X
|
||||
wget -q https://developer.nvidia.com/embedded/L4T/r32_Release_v5.0/T186/Jetson_Multimedia_API_R32.5.0_aarch64.tbz2 -O jetson_multimedia_api.tbz2
|
||||
|
||||
20
docker/tensorrt/install_python_39.sh
Executable file
20
docker/tensorrt/install_python_39.sh
Executable file
@ -0,0 +1,20 @@
|
||||
if [ -e /usr/local/cuda-12.2 ]; then
|
||||
apt-get update && \
|
||||
apt-get install wget build-essential ccache clang cmake pkg-config -y
|
||||
|
||||
wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
|
||||
tar -xf Python-3.9.6.tgz
|
||||
cd Python-3.9.6
|
||||
./configure --enable-optimizations
|
||||
make altinstall
|
||||
|
||||
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.9 1
|
||||
else
|
||||
apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends \
|
||||
python3.9 python3.9-dev \
|
||||
wget build-essential cmake git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user