Closed matthewfeickert closed 1 year ago
@matthewfeickert could you please check my environment.yml file? I thought it is all packages used for "example hello_world". Or is it better to have a discussion about it tomorrow?
I thought it is all packages used for "example hello_world"
Yeah, it should contain the high level requirements for everything that is needed to create the environment for a project to run. I left some comments on PR #7 that might be relevant, as getting the workflow to run in the CI environment is a good check that things are setup correctly.
Closed by PR #6
Now that there are some workflow files from PR #4, it would be good to have an environment definition file that gives the software requirements to be able to run the workflow. To do this with
conda
/mamba
/micromamba
anenvironment.yml
file is used.The docs for this are here https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html and it would be good to read through these in general. However, sometimes a minimal example is useful. The following
environment.yml
file creates a very simpleconda
virtual environment namedenv-example
that will include Python 3.11,pip
,scipy
,jax
, andjupyterlab
and their dependencies.Note: In general you should assume that for anything science related that the
default
channel should NOT be used and we should always assume unless told otherwise by a project to use theconda-forge
channel.We can use
conda
to make a new environment from this file withand then you can activate the environment with
if you update the
environment.yml
file with new dependnecies in the activated environment of the same name you can just doto install those new dependencies into your environment.
If we have this environment file locally we can demo in a Docker image how to use it
Note that these sorts of things are things that other IRIS-HEP Fellows that I'm working with are also learning (e.g. https://github.com/Samcoodess/reana-dms/issues/5) so feel free to talk with people like Sam as well, as learning together can be an accelerator. (I'm of course happy to discuss too.)