Commit 55ec7be6 authored by Stefan Kesselheim's avatar Stefan Kesselheim
Browse files

first version of environment

parent f6eb71d8
venv
overlay.img
conda_env
pgks_dirs
......@@ -6,10 +6,20 @@ ABSOLUTE_PATH=`realpath ${RELATIVE_PATH}`
source ${ABSOLUTE_PATH}/config.sh
export PYTHONPATH=`echo ${ENV_DIR}/lib/python*/site-packages`:${PYTHONPATH}
source ${ENV_DIR}/bin/activate
#export PYTHONPATH=`echo ${ENV_DIR}/lib/python*/site-packages`:${PYTHONPATH}
__conda_setup="$('/opt/conda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/conda/etc/profile.d/conda.sh" ]; then
. "/opt/conda/etc/profile.d/conda.sh"
else
export PATH="/opt/conda/bin:$PATH"
fi
fi
unset __conda_setup
conda activate ${ENV_DIR}
......@@ -7,7 +7,7 @@ ABSOLUTE_PATH=`realpath ${RELATIVE_PATH}`
### User Configuration
export ENV_NAME=`basename $ABSOLUTE_PATH` # Default Name of the venv is the directory that contains this file
export ENV_DIR=${ABSOLUTE_PATH}/venv # Default location of this VENV is "./venv"
export ENV_DIR=${ABSOLUTE_PATH}/conda_env # Default location of this VENV is "./venv"
export CONDA_PKGS_DIRS=${ABSOLUTE_PATH}/pgks_dirs
export SINGULARITY_IMAGE=/p/project/jb_benchmark/nvidia_singularity_images/nvidia_tensorflow_21.02-tf1-py3.sif
export SINGULARITY_IMAGE=/p/project/jb_benchmark/nvidia_singularity_images/nvidia_pytorch_bert_20.06-py3-m5.1.sif
export SINGULARITY_IMAGE=/p/project/hai_sbi2021/singularity/pytorch_21.08-py3.sif
name: sbi_workshop
channels:
- pytorch
- defaults
- conda-forge
dependencies:
- python=3.7.10
- pytorch=1.8.1
- ipykernel==5.1.3
- ipywidgets
- scikit-learn
- scipy
- pip
- pip:
- "sbi==0.16.0"
- "rise==5.7.1"
- sbibm
name: sbi_workshop
channels:
- pytorch
- defaults
- conda-forge
dependencies:
- python=3.7.10
- pytorch=1.8.1
- scikit-learn
- jupyter
- jupyterlab
- scipy
- nbstripout
- jupyter_contrib_nbextensions
- pip
- pip:
- "sbi==0.16.0"
- "rise==5.7.1"
- sbibm
......@@ -2,6 +2,8 @@
export RELATIVE_PATH=`dirname ${BASH_SOURCE}`
export ABSOLUTE_PATH=`realpath ${RELATIVE_PATH}`
ml purge
source ${ABSOLUTE_PATH}/config.sh
echo path ${ABSOLUTE_PATH}
......@@ -15,15 +17,7 @@ dd if=/dev/zero of=overlay.img bs=1M count=500 && \
mkfs.ext3 -d overlay overlay.img
singularity run --overlay ${ABSOLUTE_PATH}/overlay.img $SINGULARITY_IMAGE bash -c '
python -m venv --prompt $ENV_NAME --system-site-packages ${ENV_DIR};
source ${ABSOLUTE_PATH}/activate.sh;
pip install --cache-dir ${ABSOLUTE_PATH}/cache --upgrade pip
#conda install -y ipykernel==5.1.3
conda uninstall -y ipykernel
pip install --cache-dir ${ABSOLUTE_PATH}/cache -r ${ABSOLUTE_PATH}/requirements.txt;
conda env create --prefix ./conda_env -f environment.yml
'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment