Skip to content
Snippets Groups Projects
Commit 1b3814d0 authored by Jan Habscheid's avatar Jan Habscheid
Browse files

Merge branch 'macos-docker-instructions' into 'main'

Add Docker setup and document it in Readme (for macOS)

See merge request JanHab/bsc-electrolytemodels!5
parents e94415a1 7400a756
No related branches found
No related tags found
1 merge request!5Add Docker setup and document it in Readme (for macOS)
Pipeline #1493190 passed
# Start with a base image that includes conda
FROM continuumio/miniconda3
# Set environment variables
ENV CONDA_DEFAULT_ENV=fenicsx-env
ENV PATH /opt/conda/envs/${CONDA_DEFAULT_ENV}/bin:$PATH
ENV HOME /root
# Create the environment and install packages
RUN conda create --name ${CONDA_DEFAULT_ENV} python=3.12.3 -y && \
conda install -n ${CONDA_DEFAULT_ENV} -c conda-forge fenics-dolfinx=0.8.0 mpich=4.2.1 pyvista=0.43.10 matplotlib=3.8.4 numpy=1.26.4 scipy=1.14.0 gcc=12.4.0 sphinx=7.3.7 myst-parser=4.0.0 sphinx-copybutton=0.5.2 sphinx-rtd-theme=3.0.1 -y
# Activate environment
SHELL ["conda", "run", "-n", "fenicsx-env", "/bin/bash", "-c"]
WORKDIR /root
# Set the default environment on container start
# ENTRYPOINT ["conda", "run", "-n", "fenicsx-env", "/bin/bash", "-c"]
CMD ["bash"]
# Reproducibility Repository for Numerical Treatment of a Thermodynamically Consistent Electrolyte Model (B.Sc. Thesis - Jan Habscheid)
[![Pipeline Status](https://git.rwth-aachen.de/Jan.Habscheid/bsc-electrolytemodels/badges/main/pipeline.svg)](https://git.rwth-aachen.de/Jan.Habscheid/bsc-electrolytemodels/pipelines)
[![Pipeline Status](https://git.rwth-aachen.de/Jan.Habscheid/bsc-electrolytemodels/badges/main/pipeline.svg)](https://git.rwth-aachen.de/Jan.Habscheid/bsc-electrolytemodels/pipelines)
[![Documentation](https://img.shields.io/badge/docs-latest-blue)](https://janhab.pages.rwth-aachen.de/bsc-electrolytemodels/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13645296.svg)](https://doi.org/10.5281/zenodo.13645296)
[![GitLab Version](https://img.shields.io/badge/version-1.0-blue.svg)](https://git.rwth-aachen.de/jan.habscheid/bsc-electrolytemodels/-/tags)
......@@ -40,9 +40,16 @@ Use the "environment.yml" file to install all necessary environments
conda env create -f environment.yml
```
### macOS installation using Docker
```
docker compose build
docker compose run solver
```
## Usage
Find the visualizations from the thesis and some extra calculations in the "examples" folder.
Find the visualizations from the thesis and some extra calculations in the "examples" folder.
In the subfolder "ReproducableCode" is the code, to execute the calculations with some first visualizations.
The subfolder "Data" stores the data for all the simulations in a *.npz file, which can be read with numpy `np.load(file.npz)`.
"Visualizations" creates the necessary figures from the thesis and stores them in *.svg format in "Figures".
......@@ -66,4 +73,4 @@ In "src" there are the generic FEniCSx implementations, that were used to calcul
- Prof. Dr. Manuel Torrilhon
- ACoM - Applied and Computational Mathematics
- RWTH Aachen University
- mt@acom.rwth-aachen.de
\ No newline at end of file
- mt@acom.rwth-aachen.de
services:
solver:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/root/solver
stdin_open: true # Equivalent to -i for interactive mode
tty: true # Equivalent to -t for a terminal interface
command: ["/bin/bash"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment