-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathDockerfile.pre-release
More file actions
47 lines (40 loc) · 1.47 KB
/
Copy pathDockerfile.pre-release
File metadata and controls
47 lines (40 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM python:3-slim
WORKDIR /usr/src/app/tesla_dashcam
# Install FFmpeg with GPU support (both VAAPI and NVIDIA) and other dependencies
# Note: Debian's FFmpeg is compiled with both VAAPI and NVENC support
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
# FFmpeg with GPU support
ffmpeg \
# Application dependencies
fonts-freefont-ttf \
libnotify-bin \
# Build essentials for psutil.
build-essential \
python3-dev \
# git etc. to get latest pre-release
git \
curl \
jq \
# VAAPI runtime libraries (for Intel and AMD GPUs)
libva2 \
libva-drm2 \
mesa-va-drivers \
vainfo \
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
apt-get install -y --no-install-recommends \
i965-va-driver intel-media-va-driver; \
else \
echo "Skipping Intel VA drivers on $(dpkg --print-architecture)"; \
fi \
&& apt-get remove --purge --auto-remove -y && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app/tesla_dashcam
RUN TAG=$(curl -s https://api.github.com/repos/ehendrix23/tesla_dashcam/releases \
| jq -r '[.[] | select(.prerelease)] | max_by(.created_at).tag_name') \
&& git clone --depth 1 --branch "$TAG" https://github.com/ehendrix23/tesla_dashcam.git .
RUN pip install --no-cache-dir -r requirements.txt
# Enable Logs to show on run
ENV PYTHONUNBUFFERED=true
# Provide a default timezone
ENV TZ=America/New_York
ENTRYPOINT [ "python3", "tesla_dashcam/tesla_dashcam.py" ]