-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (35 loc) · 1.2 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
FROM python:3.10-slim
LABEL maintainer="Ladybug Tools" email="[email protected]"
ENV HOMEDIR='/home/ladybugbot'
ENV PATH="${HOMEDIR}/.local/bin:${PATH}"
ENV LIBRARYDIR="${HOMEDIR}/lib"
ENV RUNDIR="${HOMEDIR}/run"
RUN apt-get update \
&& apt-get -y install ffmpeg libsm6 libxext6 xvfb --no-install-recommends git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN adduser ladybugbot --uid 1000 --disabled-password --gecos ""
USER ladybugbot
WORKDIR ${HOMEDIR}
RUN mkdir ladybug_tools && touch ladybug_tools/config.json
# Install dragonfly-display
COPY dragonfly_display ${LIBRARYDIR}/dragonfly_display
COPY .git ${LIBRARYDIR}/.git
COPY setup.py ${LIBRARYDIR}
COPY setup.cfg ${LIBRARYDIR}
COPY requirements.txt ${LIBRARYDIR}
COPY extras-requirements.txt ${LIBRARYDIR}
COPY README.md ${LIBRARYDIR}
COPY LICENSE ${LIBRARYDIR}
USER root
RUN pip3 install --no-cache-dir setuptools wheel xvfbwrapper \
&& pip3 install --no-cache-dir ${LIBRARYDIR}[full] \
&& apt-get -y --purge remove git \
&& apt-get -y clean \
&& apt-get -y autoremove \
&& rm -rf ${LIBRARYDIR}/.git
USER ladybugbot
# Set up working directory
RUN mkdir -p ${RUNDIR}/simulation
WORKDIR ${RUNDIR}