-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
88 lines (73 loc) · 2.52 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FROM python:3.11.9-bookworm
# Define arguments for target platform
# These arguments are defined automatically by buildx when using `--platform`
ARG TARGETARCH
ARG TARGETVARIANT
RUN echo "Building to: ${TARGETARCH} ${TARGETVARIANT}"
RUN apt update -y
RUN apt install -y nginx
RUN apt install -y cmake build-essential libffi-dev libzmq3-dev libopenblas-dev
RUN echo "Configuring pip to use piwheels"
RUN echo "[global]" >> /etc/pip.conf
RUN echo "extra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf
RUN pip install --no-cache-dir plotly --verbose
RUN pip install --no-cache-dir --verbose \
bluerobotics-ping \
bluerobotics-navigator
RUN pip install matplotlib
RUN pip install numpy
RUN pip install --no-cache-dir pymavlink --verbose
RUN pip install pyserial
# It takes forever to run this one!! Edit from this line below
RUN pip install --upgrade pip
RUN pip install cmake scikit-build --verbose
RUN apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl
RUN CMAKE_ARGS=-DPYTHON3_LIMITED_API=ON pip install opencv-python-headless --verbose
# This need to be after opencv
RUN pip install --no-cache-dir jupyterlab --verbose
RUN pip install mavsdk
# Move our nginx configuration to the standard nginx path
COPY files/nginx.conf /etc/nginx/nginx.conf
# Add our static files to a common folder to be provided by nginx
RUN mkdir -p /site
COPY files/register_service /site/register_service
# Copy everything for your application
COPY files/entrypoint.sh /entrypoint.sh
RUN mkdir -p /home/workspace/.local
COPY examples /tmp/examples
# Add docker configuration
LABEL permissions='{\
"NetworkMode": "host",\
"HostConfig": {\
"Privileged": true,\
"Binds": [\
"/usr/blueos/extensions/jupyter/root:/root:rw",\
"/dev:/dev:rw"\
],\
"Privileged": true,\
"NetworkMode": "host"\
}\
}'
LABEL authors='[\
{\
"name": "Patrick José Pereira",\
"email": "[email protected]"\
},\
{\
"name": "Raul Victor Trombin",\
"email": "[email protected]"\
}\
]'
LABEL company='{\
"about": "",\
"name": "Blue Robotics",\
"email": "[email protected]"\
}'
LABEL readme="https://raw.githubusercontent.com/BlueOS-Community/blueos-jupyter/master/README.md"
LABEL type="other"
LABEL tags='[\
"python",\
"ide",\
"development"\
]'
ENTRYPOINT ["/entrypoint.sh"]