Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker recipe to install from source #1651

Merged
merged 34 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9ef7da5
Update dockerfile
Mar 12, 2020
e48a839
Update docker
Apr 1, 2020
72b9b43
Merge branch 'master' of https://github.com/ESMValGroup/ESMValTool in…
Apr 1, 2020
d0db656
Update dockerfile
Apr 1, 2020
73f3cb8
Update dockerfile
Apr 6, 2020
6b576a1
Merge branch 'master' of https://github.com/ESMValGroup/ESMValTool in…
May 7, 2020
8187210
Update docker files
May 7, 2020
7078625
Merge branch 'master' of https://github.com/ESMValGroup/ESMValTool in…
Jul 3, 2020
f8877b3
Update docker and environment
Jul 3, 2020
5ce6335
Some progress
Jul 11, 2020
374c511
Progress in experimental
Jul 14, 2020
652ae7a
Fix command line argument and remove commented out stuff
bouweandela Jul 22, 2020
1541260
Remove no longer needed cache and enable all tests
bouweandela Jul 22, 2020
a224589
Merge branch 'master' of github.com:ESMValGroup/ESMValTool into updat…
bouweandela Jul 22, 2020
eaf0011
Update doc
Jul 23, 2020
11e3a1f
Update docker files
Jul 23, 2020
07820dd
Fix folder names
Jul 23, 2020
507b79f
Merge branch 'master' of https://github.com/ESMValGroup/ESMValTool in…
Jul 23, 2020
83167bd
Apply suggestions from code review
Jul 24, 2020
53192a5
Add esmvaltool install command
bouweandela Jul 28, 2020
9ddc6ad
Apply suggestions from code review
Jul 28, 2020
c4422eb
Add dockerignore for better cache management
Jul 28, 2020
5dab33f
Better cache for R packages
Jul 28, 2020
f043480
Dockerignore actually working
Jul 28, 2020
555fe5b
Trying with pip -e
Jul 28, 2020
808ebe1
Update doc and dockerfiles
Jul 28, 2020
18a453d
Fix doc
Jul 28, 2020
d7f39e2
Merge branch 'master' of github.com:ESMValGroup/ESMValTool into updat…
bouweandela Jul 30, 2020
621b14d
Apply suggestions from code review
Jul 30, 2020
784f91a
Fix tests and comments
bouweandela Jul 31, 2020
fcebbc2
Better examples and fix title
bouweandela Jul 31, 2020
fc6598a
Fix installation test
bouweandela Aug 3, 2020
0f95708
Install test dependencies
bouweandela Aug 3, 2020
931fdbc
Upload coverage for regular unit tests
bouweandela Aug 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# Run Python 3 tests
working_directory: /test
docker:
- image: continuumio/miniconda3
- image: esmvalgroup/esmvaltool:development
steps:
- checkout
- run:
Expand All @@ -33,14 +33,6 @@ jobs:
- run:
# Update/Create Conda environment and run tests
command: |
. /opt/conda/etc/profile.d/conda.sh
mkdir /logs
# conda update -y conda >> /logs/conda.txt 2>&1
conda env update >> /logs/conda.txt 2>&1
conda activate esmvaltool
# Install r-lintr for r linter test
Rscript esmvaltool/install/R/setup_devutils.R > /logs/R_install.txt 2>&1
# Run tests
python setup.py test --addopts '-m "not installation"'
no_output_timeout: 20m
- save_cache:
Expand Down
20 changes: 9 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
FROM continuumio/miniconda3
FROM esmvalgroup/esmvalcore:latest
bouweandela marked this conversation as resolved.
Show resolved Hide resolved

# update the conda packages
RUN conda update -y conda pip

# install development tools
RUN apt-get update -y && apt-get install -y \
build-essential \
curl \
unzip
COPY . /esmvaltool
WORKDIR /esmvaltool

# install environment packages
RUN conda install -c conda-forge -c esmvalgroup -c birdhouse esmvaltool
RUN apt install julia -y
RUN conda env update --name base --file environment.yml && conda clean --all -y
RUN pip install .
RUN Rscript esmvaltool/install/R/setup.R
RUN julia esmvaltool/install/Julia/setup.jl
bouweandela marked this conversation as resolved.
Show resolved Hide resolved

# run tests
RUN esmvaltool -h
RUN esmvaltool version

ENTRYPOINT ["esmvaltool"]
CMD ["-h"]
13 changes: 13 additions & 0 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM esmvalgroup/esmvalcore:latest
bouweandela marked this conversation as resolved.
Show resolved Hide resolved

COPY . /esmvaltool
WORKDIR /esmvaltool

RUN conda env update -n base environment.yml
RUN pip install .[develop]
RUN Rscript esmvaltool/install/R/setup.R
RUN julia esmvaltool/install/Julia/setup.jl

# Clean ESMValTool
RUN pip uninstall esmvaltool -y
bouweandela marked this conversation as resolved.
Show resolved Hide resolved
RUN rm -r /esmvaltool
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
name: esmvaltool
channels:
- conda-forge
- esmvalgroup
bouweandela marked this conversation as resolved.
Show resolved Hide resolved

dependencies:
# Python packages that cannot be installed from PyPI:
- gdal
- esmvalcore>=2.0.0b9,<2.1
bouweandela marked this conversation as resolved.
Show resolved Hide resolved
- esmf
# Non-Python dependencies
- cdo>=1.9.7
Expand All @@ -21,3 +19,4 @@ dependencies:
- r-base>=3.5
- r-curl # Dependency of lintr, but fails to compile because it cannot find libcurl installed from conda.
- r-udunits2 # Fails to compile because it cannot find udunits2 installed from conda.
- libblas=3.8.0=12_openblas # Does build 13_openblas not seem to work with R requirements
bouweandela marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion esmvaltool/install/Julia/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if VERSION >= v"0.7.0-DEV.2005"
using Pkg
end

ENV["PYTHON"] = string(ENV["CONDA_PREFIX"], "/bin/python")
# ENV["PYTHON"] = string(ENV["CONDA_PREFIX"], "/bin/python")
bouweandela marked this conversation as resolved.
Show resolved Hide resolved

Pkg.activate(@__DIR__)
Pkg.instantiate()
Expand Down