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

Move src directory name to package name + install package locally in dockerfile

parent 07673e00
Branches
Tags
1 merge request!8Package
Pipeline #1540895 passed
Showing
with 15 additions and 15 deletions
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*__pycache__* *__pycache__*
*.__pycache__ *.__pycache__
*test/__pycache__ *test/__pycache__
*src/__pycache__ *fxdgm/__pycache__
*examples/__pycache__ *examples/__pycache__
*examples/ReproduableCode/__pycache__ *examples/ReproduableCode/__pycache__
*.pytest_cache* *.pytest_cache*
......
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
FROM continuumio/miniconda3 FROM continuumio/miniconda3
# Set environment variables # Set environment variables
ENV CONDA_DEFAULT_ENV=fxdgm ENV CONDA_DEFAULT_ENV=base
ENV PATH /opt/conda/envs/${CONDA_DEFAULT_ENV}/bin:$PATH ENV PATH /opt/conda/envs/${CONDA_DEFAULT_ENV}/bin:$PATH
ENV HOME /root ENV HOME /root
# Create the environment and install packages # Create the environment and install packages
# FEniCSx backend + documentation and testing dependencies # FEniCSx backend + documentation and testing dependencies
RUN conda create --name ${CONDA_DEFAULT_ENV} python=3.12.3 -y && \ RUN conda install -n ${CONDA_DEFAULT_ENV} -c conda-forge fenics-dolfinx=0.8.0 mpich=4.2.1 pyvista=0.43.10 gcc=12.4.0 sphinx=7.3.7 myst-parser=4.0.0 sphinx-copybutton=0.5.2 sphinx-rtd-theme=3.0.1 pytest==8.3.3 -y
conda install -n ${CONDA_DEFAULT_ENV} -c conda-forge fenics-dolfinx=0.8.0 mpich=4.2.1 pyvista=0.43.10 gcc=12.4.0 sphinx=7.3.7 myst-parser=4.0.0 sphinx-copybutton=0.5.2 sphinx-rtd-theme=3.0.1 pytest==8.3.3 -y
# fxdgm package from git # fxdgm package from git
RUN pip install git+https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels@Package
# Activate environment # Activate environment
SHELL ["conda", "run", "-n", "fenicsx-env", "/bin/bash", "-c"] # SHELL ["conda", "run", "-n", "fenicsx-env", "/bin/bash", "-c"]
WORKDIR /root
# WORKDIR /solver
# WORKDIR /root ADD . /fxdgm
WORKDIR /solver RUN pip install --editable /fxdgm/.
# Set the default environment on container start
# ENTRYPOINT ["conda", "run", "-n", "fenicsx-env", "/bin/bash", "-c"]
CMD ["bash"] CMD ["bash"]
...@@ -65,7 +65,7 @@ python -m pytest ...@@ -65,7 +65,7 @@ python -m pytest
## Usage ## Usage
Find the package source code in [src](https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/src?ref_type=heads). Find the package source code in [fxdgm](https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/fxdgm?ref_type=heads).
This implements the nonlinear electrolyte model. This implements the nonlinear electrolyte model.
Furthermore, some physical examples are provided in the [examples](https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/examples?ref_type=heads). Furthermore, some physical examples are provided in the [examples](https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/examples?ref_type=heads).
......
...@@ -11,11 +11,11 @@ copyright = '2024, Jan Habscheid' ...@@ -11,11 +11,11 @@ copyright = '2024, Jan Habscheid'
author = 'Jan Habscheid' author = 'Jan Habscheid'
release = 'September, 2024' release = 'September, 2024'
# Add src folder to path # Add fxdgm folder to path
import os import os
import sys import sys
sys.path.insert(0, os.path.abspath(os.path.join("..", "../src"))) sys.path.insert(0, os.path.abspath(os.path.join("..", "../fxdgm")))
sys.path.insert(0, os.path.abspath('../src')) sys.path.insert(0, os.path.abspath('../fxdgm'))
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
......
...@@ -84,7 +84,7 @@ Testing ...@@ -84,7 +84,7 @@ Testing
Usage Usage
===== =====
| Find the package source code in `src <https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/src?ref_type=heads>`_ | Find the package source code in `fxdgm <https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/fxdgm?ref_type=heads>`_
| This implements the nonlinear electrolyte model. | This implements the nonlinear electrolyte model.
| Furthermore, some physical examples are provided in the `examples <https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/examples?ref_type=heads>`_ folder. | Furthermore, some physical examples are provided in the `examples <https://git.rwth-aachen.de/JanHab/bsc-electrolytemodels/-/tree/main/examples?ref_type=heads>`_ folder.
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment