Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
updated Dockerfile (to use arm64 compatible miniconda3, instead of li…
Browse files Browse the repository at this point in the history
…ghtweight alpine), environment.yml (to address dependabot alerts), and docker-build.bat to prepare multiplatform build; haven't fully tested, but so far at least the build looks successful on arm64, which is closer than we've gotten before (see healthysustainablecities#172 and healthysustainablecities#375); multiarch build sometimes still fails on a http error (docker suggests retrying as fix, and seems to work)
  • Loading branch information
carlhiggs committed Feb 28, 2024
1 parent dba60f7 commit 971298d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# >>> docker rmi $(docker images -q) --force
##############################################################################

FROM continuumio/miniconda3:23.5.2-0-alpine as build
FROM continuumio/miniconda3:23.10.0-1 as build
LABEL maintainer="Global Healthy Liveable City Indicator Study Collaboration Group"
LABEL url="https://github.com/global-healthy-liveable-cities/global-indicators"

Expand Down
9 changes: 7 additions & 2 deletions docker/docker-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ echo.
set "DOCKERUSER=globalhealthyliveablecities"
set "PACKAGE=global-indicators"
for /f "usebackq" %%x in ("%CD%\..\.ghsci_version") do set VERSION=%%x
echo %PACKAGE% version %VERSION%
:: login and remove any existing containers or images
docker login

:: build the image and export the conda env to yml
:: build test image and export the conda env to yml
docker build -t %DOCKERUSER%/%PACKAGE% .
docker run --rm -it --shm-size=2g --net=host -v "%CD%":/home/ghsci globalhealthyliveablecities/global-indicators /bin/bash -c "pip list --format=freeze > ./requirements.txt"
docker run --rm -it --shm-size=2g --net=host -v "%CD%":/home/ghsci %DOCKERUSER%/%PACKAGE% /bin/bash -c "pip list --format=freeze > ./requirements.txt"

:: built multi-platform image
docker buildx create --use
docker buildx build --platform=linux/amd64,linux/arm64 -t %DOCKERUSER%/%PACKAGE%:v%VERSION% .

:: get the package version, tag the image with it, then push to hub
echo %PACKAGE% version %VERSION%
Expand Down
60 changes: 30 additions & 30 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async-lru==2.0.4
attrs==23.2.0
Babel==2.14.0
beautifulsoup4==4.12.3
bidict==0.22.1
bidict==0.23.1
bleach==6.1.0
branca==0.7.1
Brotli==1.1.0
Expand All @@ -24,7 +24,7 @@ click-plugins==1.1.1
cligj==0.7.2
colorama==0.4.6
comm==0.2.1
contextily==1.5.0
contextily==1.5.1
contourpy==1.2.0
cryptography==42.0.2
cycler==0.12.1
Expand All @@ -37,15 +37,15 @@ entrypoints==0.4
et-xmlfile==1.1.0
exceptiongroup==1.2.0
executing==2.0.1
fastapi==0.109.2
fastapi==0.110.0
fastapi-socketio==0.0.10
fastjsonschema==2.19.1
fiona==1.9.5
folium==0.15.1
fonttools==4.43.0
fpdf2==2.7.7
fpdf2==2.7.8
fqdn==1.5.1
GDAL==3.8.3
GDAL==3.8.4
GeoAlchemy2==0.14.4
geographiclib==1.52
geopandas==0.14.3
Expand All @@ -55,22 +55,22 @@ gtfs-lite==0.2.1
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.2
httpx==0.26.0
httpcore==1.0.4
httpx==0.27.0
hyperframe==6.0.1
idna==3.6
ifaddr==0.2.0
importlib-metadata==7.0.1
importlib-resources==6.1.1
ipykernel==6.29.2
ipython==8.21.0
importlib_resources==6.1.2
ipykernel==6.29.3
ipython==8.22.1
ipywidgets==8.1.2
isoduration==20.11.0
itsdangerous==2.1.2
jedi==0.19.1
Jinja2==3.1.3
joblib==1.3.2
json5==0.9.14
json5==0.9.17
jsonpointer==2.4
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
Expand All @@ -82,25 +82,25 @@ jupyter_server==2.12.5
jupyter_server_terminals==0.5.2
jupyterlab==4.0.12
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.2
jupyterlab_server==2.25.3
jupyterlab_widgets==3.0.10
kiwisolver==1.4.5
lxml==5.1.0
mapclassify==2.6.1
markdown2==2.4.12
markdown2==2.4.13
MarkupSafe==2.1.5
matplotlib==3.8.2
matplotlib==3.8.3
matplotlib-inline==0.1.6
mercantile==1.2.1
mistune==3.0.2
munkres==1.1.4
nbclient==0.8.0
nbconvert==7.16.0
nbconvert==7.16.1
nbformat==5.9.2
nest_asyncio==1.6.0
networkx==3.2.1
nicegui==1.4.12.dev0
notebook_shim==0.2.3
notebook_shim==0.2.4
numexpr==2.9.0
numpy==1.26.4
openpyxl==3.1.2
Expand All @@ -119,7 +119,7 @@ pillow==10.2.0
pip==24.0
pkgutil_resolve_name==1.3.10
platformdirs==4.2.0
prometheus-client==0.19.0
prometheus_client==0.20.0
prompt-toolkit==3.0.42
pscript==0.7.7
psutil==5.9.8
Expand All @@ -128,8 +128,8 @@ ptyprocess==0.7.0
pure-eval==0.2.2
py-cpuinfo==9.0.0
pycparser==2.21
pydantic==2.6.1
pydantic_core==2.16.2
pydantic==2.6.3
pydantic_core==2.16.3
pygeometa==0.15.3
Pygments==2.17.2
pyparsing==3.1.1
Expand All @@ -152,16 +152,16 @@ referencing==0.33.0
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.17.1
rpds-py==0.18.0
Rtree==1.2.0
scikit-learn==1.4.0
scikit-learn==1.4.1.post1
scipy==1.12.0
Send2Trash==1.8.2
setuptools==69.0.3
shapely==2.0.2
setuptools==69.1.1
shapely==2.0.3
simple-websocket==1.0.0
six==1.16.0
sniffio==1.3.0
sniffio==1.3.1
snuggs==1.4.7
soupsieve==2.5
SQLAlchemy==1.4.49
Expand All @@ -170,19 +170,19 @@ stack-data==0.6.2
starlette==0.36.3
tables==3.9.2
terminado==0.18.0
threadpoolctl==3.2.0
threadpoolctl==3.3.0
tinycss2==1.2.1
tomli==2.0.1
tornado==6.3.3
tqdm==4.66.1
tornado==6.4
tqdm==4.66.2
traitlets==5.14.1
types-python-dateutil==2.8.19.20240106
typing_extensions==4.9.0
typing_extensions==4.10.0
typing-utils==0.1.0
tzdata==2023.4
tzdata==2024.1
uri-template==1.3.0
urllib3==2.0.7
uvicorn==0.27.0.post1
uvicorn==0.27.1
vbuild==0.8.2
watchfiles==0.18.1
wcwidth==0.2.13
Expand Down

0 comments on commit 971298d

Please sign in to comment.