-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
41 lines (31 loc) · 1.22 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
FROM continuumio/miniconda3:23.3.1-0
LABEL authors="j-desloires"
# Set the PATH to include Miniconda
ENV PATH /root/miniconda3/bin:$PATH
# Update conda and install any additional packages
#RUN conda install --name base -c conda-forge mamba
COPY environment.yml requirements.txt requirements-dev.txt ./
RUN conda config --set ssl_verify no
RUN conda env create -f environment.yml
RUN echo "conda activate $(head -1 environment.yml | cut -d' ' -f2)" >> ~/.bashrc
ENV PATH /opt/conda/envs/$(head -1 environment.yml | cut -d' ' -f2)/bin:$PATH
ENV CONDA_DEFAULT_ENV $(head -1 environment.yml | cut -d' ' -f2)
SHELL ["/bin/bash", "--login", "-c"]
#################################################################################################################
WORKDIR /eocrops
# Unittest
## Scripts
COPY ./tests ./tests
## Files used in the tests
COPY data ./data
# Examples for the documentation
COPY ./examples/ ./examples
# Modules
COPY ./eocrops ./eocrops
COPY environment.yml requirements.txt requirements-doc.txt setup.py README.md ./
COPY ./docs ./docs
RUN conda activate $(head -1 environment.yml | cut -d' ' -f2)
RUN pip install --no-cache-dir -e .
# Test python imports
RUN python -c "import eocrops"
RUN python -c "import eolearn"