forked from SECOORA/GUTILS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
72 lines (60 loc) · 2.26 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
64
65
66
67
68
69
70
71
72
FROM phusion/baseimage:0.11
LABEL maintainer="Kyle Wilcox <[email protected]>" \
description='The GUTILS container'
# Use baseimage-docker's init system
CMD ["/sbin/my_init"]
ENV KILL_PROCESS_TIMEOUT 30
ENV KILL_ALL_PROCESSES_TIMEOUT 30
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
RUN apt-get update && apt-get install -y \
binutils \
build-essential \
bzip2 \
ca-certificates \
file \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
pwgen \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Setup CONDA (https://hub.docker.com/r/continuumio/miniconda3/~/dockerfile/)
ENV MINICONDA_VERSION py38_4.8.2
ENV MINICONDA_SHA256 5bbb193fd201ebe25f4aeb3c58ba83feced6a25982ef4afa86d5506c3656c142
RUN curl -k -o /miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-$MINICONDA_VERSION-Linux-x86_64.sh && \
echo $MINICONDA_SHA256 /miniconda.sh | sha256sum --check && \
/bin/bash /miniconda.sh -b -p /opt/conda && \
rm /miniconda.sh && \
/opt/conda/bin/conda clean -afy && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> /etc/profile && \
echo "conda activate base" >> /etc/profile && \
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
/opt/conda/bin/conda install -y -c conda-forge -n base mamba && \
/opt/conda/bin/conda clean -afy
ENV PATH /opt/conda/bin:$PATH
COPY environment.yml /tmp/environment.yml
RUN mamba env update \
-n base \
-f /tmp/environment.yml \
&& \
mamba clean -afy
ENV PATH /opt/conda/bin:$PATH
ENV GUTILS_DEPLOYMENTS_DIRECTORY /gutils/deployments
ENV GUTILS_ERDDAP_CONTENT_PATH /gutils/erddap/content
ENV GUTILS_ERDDAP_FLAG_PATH /gutils/erddap/flag
VOLUME ["${GUTILS_DEPLOYMENTS_DIRECTORY}", "${GUTILS_ERDDAP_CONTENT_PATH}", "${GUTILS_ERDDAP_FLAG_PATH}"]
RUN mkdir -p /etc/my_init.d && \
mkdir -p /gutils
COPY docker/init/* /etc/my_init.d/
ENV GUTILS_VERSION 3.2.0
ENV PROJECT_ROOT /code
RUN mkdir -p "$PROJECT_ROOT"
COPY . $PROJECT_ROOT
RUN cd $PROJECT_ROOT && pip install --no-deps .
WORKDIR $PROJECT_ROOT