FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
HydroModPy/Dockerfile at refs/heads/dev · HydroModPy/HydroModPy · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
HydroModPy
/
HydroModPy
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
11
Code
Issues
18
Pull requests
1
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
HydroModPy
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
58 lines (45 loc) · 2.01 KB
Breadcrumbs
HydroModPy
/
Dockerfile
Copy path
File metadata and controls
58 lines (45 loc) · 2.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
Multi-stage build for HydroModPy.
#
Stage 1 builds a wheel from the current source tree.
#
Stage 2 is a slim runtime image that runs as a non-root user and exposes hmp.
#
---- Stage 1: build wheel ---------------------------------------------------
FROM
python:3.12-slim AS builder
ENV
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN
apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR
/build
COPY
pyproject.toml MANIFEST.in README.md LICENSE ./
COPY
hydromodpy ./hydromodpy
RUN
pip install --no-cache-dir build \
&& python -m build --wheel --outdir /build/dist
#
---- Stage 2: runtime -------------------------------------------------------
FROM
python:3.12-slim AS runtime
ENV
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PATH=
"/home/hmp/.local/bin:${PATH}"
#
libglu1-mesa is needed by gmsh / pyvista at import time.
#
libexpat1 is needed by rasterio's runtime libraries.
RUN
apt-get update \
&& apt-get install -y --no-install-recommends libglu1-mesa libexpat1 \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -r hmp \
&& useradd -r -g hmp -m -d /home/hmp -s /usr/sbin/nologin hmp
USER
hmp
WORKDIR
/home/hmp
COPY
--from=builder --chown=hmp:hmp /build/dist/*.whl /tmp/
RUN
pip install --no-cache-dir --user /tmp/*.whl \
&& rm /tmp/*.whl
#
Solver binaries (mf6, mfnwt, ...) are not shipped in the image.
#
They are downloaded lazily on first solver run into ~/.cache/hydromodpy/bin/,
#
or eagerly via `hmp install-binaries`.
LABEL
org.opencontainers.image.title=
"HydroModPy"
\
org.opencontainers.image.description=
"Catchment-scale shallow groundwater modeling toolbox"
\
org.opencontainers.image.source=
"https://github.com/HydroModPy/HydroModPy"
\
org.opencontainers.image.licenses=
"EPL-2.0"
HEALTHCHECK
--interval=5m --timeout=15s --start-period=30s \
CMD
hmp doctor >/dev/null 2>&1 || exit 1
ENTRYPOINT
[
"hmp"
]
CMD
[
"--help"
]
Back
|
FazBrowse Home
|
New Git URL