/
Dockerfile
63 lines (55 loc) · 1.77 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
61
62
63
FROM ubuntu:22.04
MAINTAINER CVision AI <info@cvisionai.com>
ARG APT_REPO_HOST=http://archive.ubuntu.com/ubuntu/
ENV APT_REPO_HOST=${APT_REPO_HOST}
RUN sed -i "s;http://archive.ubuntu.com/ubuntu/;${APT_REPO_HOST};" /etc/apt/sources.list
# Install apt packages
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
cron \
curl \
ffmpeg \
gcc \
git \
libffi-dev \
libgdal-dev \
libgraphviz-dev \
python3 \
python3-dev \
python3-magic \
python3-pip \
python3-setuptools \
vim \
wget \
xdot \
xmlsec1 \
&& rm -rf /var/lib/apt/lists/*
# Install fork of openapi-core that works in DRF views
WORKDIR /working
RUN git clone https://github.com/jrtcppv/openapi-core.git
WORKDIR /working/openapi-core
RUN python3 setup.py install
WORKDIR /working
RUN rm -rf /working/openapi-core
# Install pip packages
RUN python3 -m pip --no-cache-dir --timeout=1000 install --upgrade pip
COPY containers/tator/requirements.txt requirements.txt
RUN pip3 --no-cache-dir --timeout=1000 install -r requirements.txt
RUN rm requirements.txt
# Get acme_tiny.py for certificate renewal
WORKDIR /
COPY containers/tator/md5sum_checks.txt checks.txt
RUN wget https://raw.githubusercontent.com/diafygi/acme-tiny/4.1.0/acme_tiny.py
# Install kubectl
RUN wget https://storage.googleapis.com/kubernetes-release/release/v1.16.9/bin/linux/amd64/kubectl
RUN md5sum --check checks.txt
RUN chmod +x kubectl
RUN mv kubectl /usr/local/bin/.
WORKDIR /tator_online
# Copy over the project
COPY api/main /tator_online/main
COPY api/tator_online /tator_online/tator_online
COPY scripts /tator_online/scripts
COPY workflows /tator_online/workflows
COPY manage.py /tator_online/manage.py
# Delete front end unit tests
RUN rm -fr /tator_online/test