CastillonMiguel / phasefieldx

An Open-Source Framework for Advanced Phase-Field Simulations
https://phasefieldx.readthedocs.io
MIT License
8 stars 2 forks source link

[JOSS REVIEW] Installation instructions #5

Open finsberg opened 1 week ago

finsberg commented 1 week ago

I belive the installation instructions could be simplified. I would suggest the following.

  1. ~Add PhaseFieldx to pypi (Check out a guide here , and see here how you can upload a new version with GitHub actions every time you make a new release). The reason for this is that many FEniCSx users already have installed FEniCSx (either from source, conda or docker), and being able to just pip install phasefieldx would be convenient.~
  2. Publish a docker image with your package (You can see an example here with a GitHub action to build it here. This is nice because user that pull your image and everything they need.
  3. Finally, I would recommend to create a conda package (related to https://github.com/CastillonMiguel/phasefieldx/issues/2), so that you don't need to specify everything the user has to install but rather state these dependencies in you conda package dependencies.

Edit: I saw that you have already added phasefieldx to pypi

This issue is related to the review here: https://github.com/openjournals/joss-reviews/issues/7307

CastillonMiguel commented 1 week ago

I’ll check on publishing a Docker image, as this could indeed simplify setup for users.

Regarding Conda-Forge, I’m currently working on this. The package is on Conda-Forge, but it’s not fully functional yet due to some issues I need to resolve. It’s taking a bit more time than anticipated, but I’m actively addressing these challenges to ensure it works smoothly. https://github.com/conda-forge/phasefieldx-feedstock https://anaconda.org/conda-forge/phasefieldx

CastillonMiguel commented 2 days ago

I recently added a Dockerfile and a GitHub Action to automate the building and publishing of the Docker image. You can view the specific commit here: 0bbc6eb. docs update The Docker container image is now available on GitHub Packages: phasefieldx container. phasefieldx container on GitHub Packages

Thank you for the example reference—it was incredibly helpful! I ran into some issues installing the latest dolfinx version (0.9.0) and handling VTK file dependencies for both arm64 and amd64 architectures. Additionally, there were compatibility problems with libgl1-mesa-glx, which I resolved by substituting it with libgl1 and libglx-mesa0. As a workaround, I’ve built the image specifically for linux/amd64, and it is now working correctly.

finsberg commented 2 days ago

If you need vtk and pyvista support you might consider using the lab image from dolfinx as your base image instead (https://github.com/FEniCS/dolfinx/pkgs/container/dolfinx%2Flab) since it already comes with this pre-installed, see https://github.com/FEniCS/dolfinx/blob/70cfbeefa19a9545fbc0e37ec518cdf111e262cc/docker/Dockerfile.end-user#L152

CastillonMiguel commented 2 days ago

I’ve added the specific parts related to PyVista and VTK to my existing Dockerfile rather than switching to the dolfinx lab image. I appreciate the tip, though. You can find the changes in my latest commit.

https://github.com/CastillonMiguel/phasefieldx/commit/1f0a7d27ccc37309fd2db7589a16247ce74888a4