Skip to content

Commit 885725f

Browse files
committed
Fix Docker build (and switch to mamba for dep resolution)
1 parent 26edda0 commit 885725f

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

Dockerfile

+11-15
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ RUN apt-get update && apt-get install -y \
2828
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2929

3030
# Setup CONDA (https://hub.docker.com/r/continuumio/miniconda3/~/dockerfile/)
31-
ENV MINICONDA_VERSION latest
32-
RUN curl -k -o /miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-$MINICONDA_VERSION-Linux-x86_64.sh && \
31+
ENV MINICONDA_VERSION py38_4.8.2
32+
ENV MINICONDA_SHA256 5bbb193fd201ebe25f4aeb3c58ba83feced6a25982ef4afa86d5506c3656c142
33+
RUN curl -k -o /miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-$MINICONDA_VERSION-Linux-x86_64.sh && \
34+
echo $MINICONDA_SHA256 /miniconda.sh | sha256sum --check && \
3335
/bin/bash /miniconda.sh -b -p /opt/conda && \
3436
rm /miniconda.sh && \
3537
/opt/conda/bin/conda clean -afy && \
@@ -38,23 +40,17 @@ RUN curl -k -o /miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-$MIN
3840
echo "conda activate base" >> /etc/profile && \
3941
find /opt/conda/ -follow -type f -name '*.a' -delete && \
4042
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
41-
/opt/conda/bin/conda update -n base conda && \
43+
/opt/conda/bin/conda install -y -c conda-forge -n base mamba && \
4244
/opt/conda/bin/conda clean -afy
4345

44-
# Copy over environment definition
46+
ENV PATH /opt/conda/bin:$PATH
47+
4548
COPY environment.yml /tmp/environment.yml
46-
RUN /opt/conda/bin/conda config \
47-
--set always_yes yes \
48-
--set changeps1 no \
49-
--set show_channel_urls True \
49+
RUN mamba env update \
50+
-n base \
51+
-f /tmp/environment.yml \
5052
&& \
51-
/opt/conda/bin/conda config \
52-
--add create_default_packages pip \
53-
--add channels axiom-data-science \
54-
--add channels conda-forge \
55-
&& \
56-
/opt/conda/bin/conda env update -n base --file /tmp/environment.yml && \
57-
/opt/conda/bin/conda clean -afy
53+
mamba clean -afy
5854

5955
ENV PATH /opt/conda/bin:$PATH
6056

environment.yml

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ channels:
44
- axiom-data-science
55
- defaults
66
dependencies:
7-
- _libgcc_mutex=0.1
87
- antlr-python-runtime=4.7.2
98
- asn1crypto=0.24.0
109
- atomicwrites=1.3.0
@@ -45,7 +44,6 @@ dependencies:
4544
- libcurl=7.65.3
4645
- libedit=3.1.20170329
4746
- libffi=3.2.1
48-
- libgcc-ng=9.1.0
4947
- libgfortran-ng=7.3.0
5048
- libiconv=1.15
5149
- liblapack=3.8.0

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ compliance-checker>=4.1.1
33
gsw
44
netCDF4
55
numpy>=1.14
6-
pandas
6+
pandas<1.0
77
pocean-core>=1.5.0,<2.0
88
pyinotify
99
scipy

0 commit comments

Comments
 (0)