-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
39 lines (29 loc) · 1.17 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
# Use the miniforge docker image
FROM condaforge/miniforge3:4.10.1-0
ARG DEBIAN_FRONTEND=noninteractive
# Install build tools, gcc etc
RUN apt-get update && apt-get install -y build-essential vim htop procps x11vnc xvfb libsdl-ttf2.0-0
# Create Python 3.5 environment and activate it
# This will use the enviroment.yml file specification
RUN echo "source activate silcam" > ~/.bashrc
ENV PATH /opt/conda/envs/silcam/bin:$PATH
ADD environment.yml /tmp/environment.yml
RUN conda env create -f=/tmp/environment.yml
# VNC server for GUI, to be run on port 5920
ENV DISPLAY :20
EXPOSE 5920
# Make Python not create .pyc files
ENV PYTHONDONTWRITEBYTECODE FALSE
# Assume that test data is mounted into the testdata path
ENV UNITTEST_DATA_PATH /testdata/unittest-data
ENV SILCAM_MODEL_PATH /testdata/keras_model/keras_model.h5
# Supress the usage of a display for unit tests
ENV MPLBACKEND Agg
# Add the Pysilcam source directory to the container in order to install Pysilcam
ADD . /silcam
# Assume the source code is mapped to /silcam
WORKDIR /silcam
# Install PySilcam dependencies
RUN python setup.py develop
# Run the PySilCam tests as default entrypoint
CMD ["python", "setup.py", "test_noskip"]