From f0cbdbc57a975813f998ecf4ee1b38a20b56498c Mon Sep 17 00:00:00 2001
From: "Dutta, Ayushi (PG/R - Comp Sci & Elec Eng)" <ayushi.dutta@surrey.ac.uk>
Date: Mon, 7 Apr 2025 13:41:40 +0000
Subject: [PATCH] init

---
 container.def | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

diff --git a/container.def b/container.def
index 204172c..2b408e6 100644
--- a/container.def
+++ b/container.def
@@ -5,19 +5,32 @@ From: nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
 %post
     # Install special software or additions
     apt-get update -y # Good practice, update the package database.
-    apt-get install -y      libopenblas-dev # Install the BLAS.
-    apt-get autoremove -y && apt-get autoclean -y # Good practice, to keep the Docker image as small as possible.
+    apt-get install -y \
+        wget curl vim bzip2 git build-essential \
+        libopenblas-dev 
+    apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* # keep the Docker image as small as possible.
+    
+    # Install Miniconda
+    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
+    bash miniconda.sh -b -p /opt/conda
+    rm miniconda.sh
+    export PATH=/opt/conda/bin:$PATH
+    source /opt/conda/etc/profile.d/conda.sh
+    conda init bash
+    
+    # Conda environment
+    git clone https://github.com/snuvclab/gala.git
+    cd gala
+    conda env create -f env.yaml
+    conda clean -afy
+    cd ..
+    rm -rf gala
 
 %environment
     # Set some environment vars
-    export PATH=/opt/root/bin:$PATH
-    export LD_LIBRARY_PATH=/opt/root/lib:$LD_LIBRARY_PATH
-    export PYTHONPATH=/opt/root/lib
-
-
-%runscript
-    # The command that will run when container is started via apptainer run command.
-    python /opt/root/tutorials/roofit/rf101_basics.py
+    export PATH=/opt/conda/bin:$PATH
+    source /opt/conda/etc/profile.d/conda.sh
+    conda activate gala
 
 %labels
     # Add custom metadata to the container.
-- 
GitLab