First commit.
This commit is contained in:
commit
16bd1cb55f
3 changed files with 63 additions and 0 deletions
48
Dockerfile
Normal file
48
Dockerfile
Normal file
|
@ -0,0 +1,48 @@
|
|||
FROM python:3.12-bookworm
|
||||
|
||||
# Build args.
|
||||
ARG UID=1001
|
||||
ARG GID=1001
|
||||
|
||||
# Update sources & upgrade packages.
|
||||
RUN apt-get update -y
|
||||
RUN apt-get upgrade -y
|
||||
|
||||
# Install ExoPlaSim dependencies.
|
||||
RUN apt-get install -y \
|
||||
build-essential gfortran \
|
||||
openmpi-bin libopenmpi-dev
|
||||
|
||||
# Add python user.
|
||||
RUN groupadd --force "${GID}"
|
||||
RUN useradd --create-home --no-log-init -u "${UID}" -g "${GID}" python
|
||||
|
||||
# Create build directory.
|
||||
RUN mkdir /build && chown "${UID}:${GID}" /build
|
||||
VOLUME /build
|
||||
|
||||
# Add GUI ExoPlaSim configuration tool.
|
||||
ADD https://github.com/OstimeusAlex/ExoPlaSim-InCon.git /utils/
|
||||
|
||||
# Add Koppen climate map tool.
|
||||
ADD https://github.com/hersfeldtn/koppenpasta.git /utils/
|
||||
|
||||
# Execute as python user from now on.
|
||||
USER python
|
||||
|
||||
# Install python libraries.
|
||||
RUN pip install --user --no-cache-dir --upgrade pip
|
||||
RUN pip install --user --no-cache-dir \
|
||||
numpy \
|
||||
scipy \
|
||||
matplotlib \
|
||||
netcdf4 \
|
||||
h5py \
|
||||
pillow \
|
||||
exoplasim
|
||||
|
||||
# Set working directory to build directory.
|
||||
WORKDIR /build
|
||||
|
||||
# Run model.
|
||||
ENTRYPOINT [ "python", "./model.py" ]
|
Loading…
Add table
Add a link
Reference in a new issue