-
Notifications
You must be signed in to change notification settings - Fork 2
/
dockerfile.hatfield
36 lines (30 loc) · 1.02 KB
/
dockerfile.hatfield
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:4.9.2-alpine AS build
COPY hatfieldcmr /hatfieldcmr/
COPY setup.py /setup.py
COPY requirements-conda.txt /requirements-conda.txt
RUN conda update -y conda && \
conda config --add channels conda-forge && \
conda config --add channels anaconda && \
conda create -y --name process python=3.9 && \
conda install -n process -y --file requirements-conda.txt
RUN conda install -c conda-forge conda-pack && \
conda-pack -n process -o /tmp/env.tar && \
mkdir /venv && cd /venv && tar xf /tmp/env.tar && \
rm /tmp/env.tar && \
/venv/bin/conda-unpack
FROM ubuntu:20.04 AS runtime
COPY --from=build /venv /venv
COPY hatfieldcmr /app/hatfieldcmr/
COPY requirements.txt app/requirements.txt
COPY admin /app/admin/
COPY analysis /app/analysis/
COPY aoi /app/aoi/
COPY download_granules /app/download_granules/
COPY process /app/process/
COPY run.py /app/run.py
COPY setup.py app/setup.py
ENV PATH=/venv/bin:$PATH
WORKDIR /app
RUN pip install -e .
ENTRYPOINT ["python", "run.py"]
CMD ["--help"]