forked from nansencenter/docker-nansat-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_slim
36 lines (26 loc) · 1 KB
/
Dockerfile_slim
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
FROM continuumio/miniconda3 as builder
LABEL maintainer="Anton Korosov <[email protected]>"
LABEL purpose="Python libs for developing and running Nansat"
# Install build tools
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc \
wget
COPY environment.yml /tmp/environment.yml
RUN conda env create -f /tmp/environment.yml
RUN wget -nc -nv -P /usr/share/MOD44W https://github.com/nansencenter/mod44w/raw/master/MOD44W.tgz && \
tar -xzf /usr/share/MOD44W/MOD44W.tgz -C /usr/share/MOD44W/
RUN conda install conda-pack && \
conda-pack -n environment -o /tmp/env.tar && \
mkdir /venv && tar -C /venv -xf /tmp/env.tar && \
/venv/bin/conda-unpack
FROM debian:buster
COPY --from=builder /usr/share/MOD44W /usr/share/MOD44W
COPY --from=builder /venv /venv
ENV VIRTUAL_ENV='/venv'
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/src
ENV MOD44WPATH=/usr/share/MOD44W
RUN python -c 'import pythesint; pythesint.update_all_vocabularies()'
WORKDIR /src