Newer
Older
# Use an official Python runtime as a parent imag
FROM ubuntu:jammy
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
48
49
50
51
52
53
54
55
56
57
58
# Install system dependencies (including git)
# Set environment variables to ensure non-interactive installations
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
software-properties-common \
curl \
gnupg2 \
lsb-release \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& rm -rf /var/lib/apt/lists/
# Install system dependencies (including Python, pip, git, and libraries)
RUN apt-get update && apt-get install -y \
python3.9 \
python3.9-dev \
python3.9-venv \
git \
libegl1-mesa \
libgles2-mesa \
libgl1-mesa-glx \
libx11-6 \
libxext6 \
libxi6 \
libxrandr2 \
libdbus-1-3 \
libxkbcommon0 \
libgl-dev \
libatlas-base-dev \
&& rm -rf /var/lib/apt/lists \
&& apt-get clean
RUN apt-get update && apt-get install -y \
binutils \
libgomp1 \
libglu1-mesa \
libx11-6 \
libxtst6 \
libxrender1 \
libxrandr2 \
libxcursor1 \
libglib2.0-0 \
libxcb-xinerama0 \
libxkbcommon-x11-0 \
mesa-utils \
openbox \
x11-apps \
xorg \
zip \
&& rm -rf /var/lib/apt/lists
RUN apt-get update && apt-get install -y \
qtbase5-dev \
qttools5-dev-tools \
libqt5x11extras5 \
libqt5gui5 \
libqt5widgets5 \
libqt5core5a \
&& rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
# Verify Python installation
RUN python3 --version
RUN git clone https://github.com/DeepLabCut/DeepLabCut.git
RUN /app/DeepLabCut/deepenv/bin/pip install wheel
# Install compatible versions of numpy and typing-extensions
RUN /app/DeepLabCut/deepenv/bin/pip install numpy==1.24.3 typing-extensions==4.5.0
RUN /app/DeepLabCut/deepenv/bin/pip install -r requirements.txt
#RUN /app/DeepLabCut/deepenv/bin/pip install deeplabcut[gui]==2.3.8
RUN /app/DeepLabCut/deepenv/bin/pip install .["gui"]
# Set the entry point to use the correct Python from the virtual environment
#ENTRYPOINT ["/app/DeepLabCut/deepenv/bin/python3", "-m", "deeplabcut"]
RUN strip --remove-section=.note.ABI-tag /lib/x86_64-linux-gnu/libQt5Core.so.5