-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 778 Bytes
/
Dockerfile
File metadata and controls
31 lines (26 loc) · 778 Bytes
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
## Dockerfile for pims
## -------------------
##
## By default, starts a bash shell:
##
## docker build -t pims .
## docker run -ti --rm pims
## python -munittest
##
FROM continuumio/miniconda3
RUN useradd -m pims
USER pims
# Set up the initial conda environment
COPY --chown=pims:pims environment.yml /src/environment.yml
WORKDIR /src
RUN conda config --prepend envs_dirs $HOME/.conda/envs
RUN conda config --prepend pkgs_dirs $HOME/.conda/pkgs
RUN conda env create -f environment.yml \
&& conda clean -tipsy
# Prepare for build
COPY --chown=pims:pims . /src
RUN echo "source activate pims" >> ~/.bashrc
ENV PATH /home/pims/.conda/envs/pims/bin:$PATH
# Build and configure for running
RUN pip install -e . --ignore-installed --no-cache-dir
env MPLBACKEND Agg