-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
63 lines (51 loc) · 1.59 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 sjawhar/pipenv:3.7-2020.8.13 as packages
USER root
WORKDIR /scratch
COPY Pipfile Pipfile.lock ./
ARG PACKAGES_DIR=/scratch/packages
RUN PIP_PREFIX=${PACKAGES_DIR} \
PIP_IGNORE_INSTALLED=1 \
pipenv install --system --ignore-pipfile --deploy
ARG LIBLSL_VERSION=1.13.1
RUN apt-get update \
&& apt-get install -y \
wget \
&& wget https://github.com/sccn/liblsl/releases/download/${LIBLSL_VERSION}/liblsl-${LIBLSL_VERSION}-manylinux2010_x64.so \
-O ${PACKAGES_DIR}/lib/python3.7/site-packages/pylsl/liblsl64.so
FROM sjawhar/muselsl as base
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
freeglut3=2.8.1-3 \
libglu1-mesa=9.0.0-2.1+b3 \
&& rm -rf /var/lib/apt/lists/*
RUN usermod -a -G audio muselsl
ENV PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.7/site-packages
FROM base as dev
USER root
RUN apt-get update \
&& apt-get install -y \
git \
python3-pip \
&& pip3 install --upgrade \
pip \
pipenv==2020.8.13
WORKDIR /app
RUN chown muselsl:muselsl .
ARG PACKAGES_DIR=/scratch/packages
COPY --from=packages ${PACKAGES_DIR} /usr/local
COPY --chown=muselsl:muselsl Pipfile Pipfile.lock ./
RUN pipenv install --system --ignore-pipfile --deploy --dev
COPY --chown=muselsl:muselsl . ./
RUN pip3 install -e .
USER muselsl
ENV SHELL /bin/bash
ENTRYPOINT []
FROM base as prod
ARG PACKAGES_DIR=/scratch/packages
COPY --from=packages ${PACKAGES_DIR} /usr/local
ARG NO_WANDER_DIR=/opt/no_wander
COPY no_wander ${NO_WANDER_DIR}/no_wander
ENV PYTHONPATH=${PYTHONPATH}:${NO_WANDER_DIR}
WORKDIR /home/muselsl
USER muselsl