forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (38 loc) · 1.03 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
#---
# name: oled
# group: hardware
# depends: []
# notes: https://github.com/NVIDIA-AI-IOT/jetcard/
#---
ARG BASE_IMAGE
FROM ubuntu:22.04
# Avoid warnings by switching to noninteractive
ARG DEBIAN_FRONTEND=noninteractive
# ============================
# Enable OLED display
# ============================
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
python3-pip \
python3-pil \
python3-smbus \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN pip3 install pillow flask Adafruit_SSD1306 smbus2
### TODO: 232 MB of disk space should be freed, but not on the resulting container image
RUN apt-get purge -y \
build-essential \
python3-dev && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean -y
WORKDIR /opt
COPY oled_server.py /opt/oled/oled_server.py
COPY utils.py /opt/oled/utils.py
RUN cd oled && \
touch __init__.py
COPY start_oled_server /
CMD /start_oled_server && /bin/bash
#CMD /bin/bash