forked from RoBorregos/sems-vision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
60 lines (50 loc) · 1.35 KB
/
Dockerfile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
ARG CUDA=11.8.0
ARG CUDNN=8
ARG OPENCV=4.7.0
ARG UBUNTU_VERSION=22.04
FROM nvidia/cuda:${CUDA}-cudnn${CUDNN}-devel-ubuntu${UBUNTU_VERSION} as runner
ARG CUDA
ARG CUDNN
ARG OPENCV
ARG BUILD_CORES=2
# Specify custom configuration folder, to be overriden via volume
ENV CAMERA_PROCESSING_CONFIG_FOLDER /config
# Needed for string substitution
SHELL ["/bin/bash", "-c"]
# Install all dependencies to build OpenCV with CUDA support
# noninteractive required to skip installation prompts
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
build-essential \
cmake \
unzip \
pkg-config \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libv4l-dev \
libxvidcore-dev \
libx264-dev \
libatlas-base-dev \
gfortran \
python3-dev \
python3-numpy \
python3 \
pipenv \
wget \
unzip
# Copy sems-processors project
WORKDIR /camera_processing
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
# Install dependencies to system python
RUN pipenv install --categories "packages cuda-packages system-packages" --system --deploy --ignore-pipfile
RUN pip install --no-deps ultralytics
COPY camera_processing camera_processing
COPY models models
# Run gunicorn
ENTRYPOINT ["python", "-m", "camera_processing"]