Created
September 28, 2021 05:17
-
-
Save npho/6de7dbcb59dcee47036e510659733089 to your computer and use it in GitHub Desktop.
How to build a Python conda environment in a Singularity container.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bootstrap: docker | |
From: continuumio/miniconda3 | |
%environment | |
export PATH=/opt/conda/bin:${PATH} | |
%files | |
compute.yml environment.yml | |
%post | |
/opt/conda/bin/conda env create -f environment.yml | |
%runscript | |
source /opt/conda/etc/profile.d/conda.sh | |
exec /opt/conda/envs/$(head -n 1 environment.yml | cut -f 2 -d ' ')/bin/"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: compute | |
channels: | |
- defaults | |
dependencies: | |
- pip=21.0.1=py38h06a4308_0 | |
- python=3.8.11=h12debd9_0_cpython | |
- pip: | |
- ipython==7.12.0 | |
- matplotlib==3.4.3 | |
- numpy==1.21.2 | |
- pandas==1.3.3 | |
- scipy==1.7.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment