forked from mikedh/trimesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (33 loc) · 1.18 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 debian:buster-slim
MAINTAINER Michael Dawson-Haggerty <[email protected]>
COPY docker/builds/apt.bash /tmp/
RUN bash /tmp/apt.bash
# build draco and download vhacd
COPY docker/builds/draco.bash /tmp/
COPY docker/builds/vhacd.bash /tmp/
COPY docker/builds/builds.bash /tmp/
RUN bash /tmp/builds.bash
# XVFB in background if you start supervisor
COPY docker/config/xvfb.supervisord.conf /etc/supervisor/conf.d/
# copy local trimesh for install and tests
COPY . /tmp/trimesh
# switch out of root
RUN useradd -m -s /bin/bash user
# make sure user owns all of tmp
RUN chown -R user:user /tmp
# switch to non-root
USER user
# install a conda env and trimesh
RUN bash /tmp/trimesh/docker/builds/conda.bash
# add user python to path
ENV PATH="/home/user/conda/bin:$PATH"
# make sure build fails if tests are failing
# -p no:warnings suppresses 10,000 useless upstream warnings
# -p no:alldep means that tests will fail if a dependency is missing
# -x will exit on first test failure
RUN pytest -x -p no:warnings -p no:alldep /tmp/trimesh/tests
# environment variables for software rendering
ENV XVFB_WHD="1920x1080x24"\
DISPLAY=":99" \
LIBGL_ALWAYS_SOFTWARE="1" \
GALLIUM_DRIVER="llvmpipe"