Skip to content

Commit 6cc14e0

Browse files
committed
Add a python3.12.6 venv to the R and FCPS apptainers
1 parent b2819ca commit 6cc14e0

File tree

3 files changed

+42
-17
lines changed

3 files changed

+42
-17
lines changed

envs/clustbench_singularity.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,3 @@ From: ubuntu:jammy-20240911.1
3333
%environment
3434

3535
. /opt/default/bin/activate
36-
echo $PATH
37-
python --version
38-
python3.12 --version

envs/fcps_singularity.def

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ From: rocker/tidyverse:4.4
77

88
%post
99

10-
# Install python packages
11-
10+
# Install python3.12
1211
apt-get update
13-
apt-get -y install python3 python3-pip python3-dev python-is-python3 git
14-
15-
pip3 install -U argparse gitpython isodate pydantic-core
12+
apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev \
13+
libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev python-is-python3 git
14+
15+
wget https://www.python.org/ftp/python/3.12.6/Python-3.12.6.tgz
16+
tar -xf Python-3.12.6.tgz
17+
cd Python-3.12.*/
18+
./configure --enable-optimizations
19+
make -j 4
20+
make altinstall
1621

17-
# Install R packages
22+
# virtualenv
23+
cd /opt
24+
python3.12 -m venv "default"
25+
. default/bin/activate
26+
27+
pip install gitpython==3.1.43 isodate pydantic-core
1828

19-
Rscript -e 'BiocManager::install(c("fcps", "dbscan", "protoclust", "energy", "argparse"))'
29+
Rscript -e 'BiocManager::install(c("FCPS", "dbscan", "protoclust", "energy", "argparse"))'
30+
31+
echo '. /opt/default/bin/activate' >> $SINGULARITY_ENVIRONMENT
2032

2133
%environment
34+
35+
. /opt/default/bin/activate

envs/r_singularity.def

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,31 @@ From: rocker/tidyverse:4.4
77

88
%post
99

10-
# Install python packages
11-
10+
# Install python3.12
1211
apt-get update
13-
apt-get -y install python3 python3-pip python3-dev python-is-python3 git
14-
15-
pip3 install argparse gitpython isodate pydantic-core
12+
apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev \
13+
libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev python-is-python3 git
14+
15+
wget https://www.python.org/ftp/python/3.12.6/Python-3.12.6.tgz
16+
tar -xf Python-3.12.6.tgz
17+
cd Python-3.12.*/
18+
./configure --enable-optimizations
19+
make -j 4
20+
make altinstall
21+
22+
# virtualenv
23+
cd /opt
24+
python3.12 -m venv "default"
25+
. default/bin/activate
26+
27+
pip install gitpython==3.1.43 isodate pydantic-core
1628

17-
#################################
1829
# Install R packages
19-
#################################
2030

2131
Rscript -e 'BiocManager::install(c("mclust", "caret", "readr", "argparse"))'
2232

33+
echo '. /opt/default/bin/activate' >> $SINGULARITY_ENVIRONMENT
34+
2335
%environment
36+
37+
. /opt/default/bin/activate

0 commit comments

Comments
 (0)