-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
50 lines (38 loc) · 1.32 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
# File from: https://fmgdata.kinja.com/using-docker-with-conda-environments-1790901398
FROM continuumio/miniconda3:latest
ARG DEBIAN_FRONTEND=noninteractive
# Set the ENTRYPOINT to use bash
# (this is also where you’d set SHELL,
# if your version of docker supports this)
SHELL [ "/bin/bash", "-c" ]
# Update conda
RUN conda update -n base conda
EXPOSE 5000
# Install additional libs
RUN apt-get clean && apt-get update && apt-get install -y nano coinor-cbc python3-gdal build-essential locales
# Set locale
RUN sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE:en
ENV LC_ALL de_DE.UTF-8
# Create code and config folder
RUN mkdir /code
RUN mkdir /config
# Install WAM conda environment
COPY environment.yml /tmp/environment.yml
COPY requirements.txt /tmp/requirements.txt
RUN conda env create -f /tmp/environment.yml
RUN echo "source activate django" > ~/.bashrc
ENV PATH="/opt/conda/envs/django/bin:$PATH"
RUN pip install --upgrade pip
# Copy WAM folder and apps
COPY . /code/
WORKDIR /code/
# Install dependencies from WAM_APPS:
ARG WAM_APPS
ENV WAM_APPS=$WAM_APPS
RUN echo "Installing reqiurements for following apps: $WAM_APPS"
RUN python /code/install_requirements.py
RUN pip install PyUtilib==5.6.3
# run entrypoint.sh
ENTRYPOINT ["/code/entrypoint.sh"]