-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu22.Dockerfile
55 lines (44 loc) · 1.56 KB
/
ubuntu22.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
#
# Copyright (c) 2016-2023, Smart Engines Service LLC
# All rights reserved
#
# Image for building python wrapper
FROM ubuntu:22.04 AS builder
# Copy SDK to image
COPY "./bin/" /home/idengine/bin/
COPY "./bindings/" /home/idengine/bindings/
COPY "./include/" /home/idengine/include/
COPY "./data-zip/" /home/idengine/data-zip/
COPY "./samples/" /home/idengine/samples/
COPY "./integration/" /home/idengine/integrations/
WORKDIR "/home/idengine/samples/idengine_sample_python/"
# remove interactive actions in console
ENV DEBIAN_FRONTEND noninteractive
RUN set -xe \
&& apt -y update \
&& apt -y install tcl \
&& apt -y install build-essential \
&& apt -y install make \
&& apt -y install cmake \
&& apt -y install python3-dev
RUN bash ./build_python_wrapper.sh "/home/idengine/bin/" 3
# Image for production
FROM ubuntu:22.04
RUN set -xe \
&& apt -y update \
&& apt -y install python3 \
&& apt -y install python3-dev
# idengine libs
COPY --from=builder /home/idengine/bin/ /home/idengine/bin/
# py wrapper
COPY --from=builder /home/idengine/bindings/python/pyidengine.py /home/idengine/bindings/python/pyidengine.py
# bundle
COPY --from=builder /home/idengine/data-zip/ /home/idengine/data-zip/
# server
COPY "./integration/docker/idengine_server.py" /home/idengine/
WORKDIR "/home/idengine/"
# --bundle_dir (required) - path to bundle.
# --lazy - IdEngine lazy mode. Not recommended for server.
# --concur - Concurrency. All CPU cores enabled by default.
# --port - Server port. [default 53000]
CMD ["bash","-c","python3 idengine_server.py --bundle_dir './data-zip/' "]