Skip to content

Commit 57027b9

Browse files
authored
Merge pull request #1841 from knutfrode/dev
Docker: Manual download of GSHHS
2 parents d94a926 + eb1c890 commit 57027b9

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@ COPY environment.yml .
1515
# Install opendrift environment into base micromamba environment
1616
RUN micromamba install -n base -f environment.yml
1717

18-
# Cache cartopy maps - temporary solution until Cartopy is updated
19-
RUN /bin/bash -c "echo -e \"import cartopy\ncartopy.io.shapereader.GSHHSShpDownloader._GSHHS_URL_TEMPLATE = ('https://github.com/GenericMappingTools/gshhg-gmt/releases/download/2.3.7/gshhg-shp-2.3.7.zip')\nfor s in ('c', 'l', 'i', 'h', 'f'): cartopy.io.shapereader.gshhs(s)\" | python"
18+
# Download cartopy GSHHS shoreline - temporary solution until Cartopy is updated
19+
SHELL ["/bin/bash", "-c"]
20+
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update && \
21+
DEBIAN_FRONTEND=noninteractive apt-get install -y unzip wget && \
22+
rm -rf /var/lib/apt/lists/* && \
23+
source activate opendrift && \
24+
mkdir -p /root/.local/share/cartopy/shapefiles/ && \
25+
cd /root/.local/share/cartopy/shapefiles/ && \
26+
rm -f gshhg-shp-2.3.7.zip && \
27+
rm -rf gshhs && \
28+
wget https://github.com/GenericMappingTools/gshhg-gmt/releases/download/2.3.7/gshhg-shp-2.3.7.zip && \
29+
unzip -o gshhg-shp-2.3.7.zip && \
30+
mv GSHHS_shp gshhs
2031

2132
## Cache cartopy maps
2233
#RUN /bin/bash -c "echo -e \"import cartopy\nfor s in ('c', 'l', 'i', 'h', 'f'): cartopy.io.shapereader.gshhs(s)\" | python"

0 commit comments

Comments
 (0)