Skip to content
Snippets Groups Projects
Verified Commit 7400a756 authored by Lambert Theisen's avatar Lambert Theisen
Browse files

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

parent e94415a1
No related branches found
No related tags found
1 merge request!5Add Docker setup and document it in Readme (for macOS)
Pipeline #1493175 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"]
......@@ -40,6 +40,13 @@ 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.
......
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.
Please register or to comment