Skip to content

Commit

Permalink
#345 adaptation of conda setup procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
sapetnioc committed Jul 11, 2023
1 parent 201e46a commit 3e0ee6d
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 72 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# casa-distro
Unified development environment for BrainVISA projects.

## Setup development environment

```shell
sh <(curl -s https://raw.githubusercontent.com/brainvisa/casa-distro/setup/conda/setup) /somewhere```
```

## Documentation

* on github, master branch: https://brainvisa.github.io/casa-distro/
Expand Down
50 changes: 4 additions & 46 deletions setup/conda/bv_maker.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[ source $CASA_SRC ]
brainvisa $CASA_DISTRO $CASA_BRANCH

[ build $CASA_BUILD ]
default_steps = configure build
make_options = -j$NCPU
Expand All @@ -8,50 +11,5 @@
clean_build = ON
test_ref_data_dir = $CASA_TESTS/ref
test_run_data_dir = $CASA_TESTS/test
# directory $CASA_SRC/3dns-private
directory $CASA_SRC/aims-free
directory $CASA_SRC/aims-gpl
directory $CASA_SRC/anatomist-free
directory $CASA_SRC/anatomist-gpl
directory $CASA_SRC/axon
# directory $CASA_SRC/bioprocessing
# directory $CASA_SRC/brainrat-gpl
# directory $CASA_SRC/brainrat-private
# directory $CASA_SRC/brainvisa-cmake
directory $CASA_SRC/brainvisa-disco
directory $CASA_SRC/brainvisa-share
directory $CASA_SRC/brainvisa-spm
directory $CASA_SRC/brainvisa_freesurfer
directory $CASA_SRC/capsul
directory $CASA_SRC/casa-distro
directory $CASA_SRC/catidb-client
directory $CASA_SRC/constellation-gpl
directory $CASA_SRC/constellation-nonfree
directory $CASA_SRC/cortical_surface-gpl
directory $CASA_SRC/cortical_surface-nonfree
directory $CASA_SRC/deidentification
directory $CASA_SRC/highres-cortex
directory $CASA_SRC/longitudinal_pipelines
directory $CASA_SRC/morpho-deepsulci
directory $CASA_SRC/morphologist
directory $CASA_SRC/morphologist-baby
directory $CASA_SRC/morphologist-gpl
directory $CASA_SRC/morphologist-nonfree
directory $CASA_SRC/nuclear_imaging-gpl
directory $CASA_SRC/nuclear_imaging-nonfree
directory $CASA_SRC/populse_db
# directory $CASA_SRC/primatologist-gpl
# QualiCATI install fail
# directory $CASA_SRC/qualicati
# directory $CASA_SRC/rsfmri
# directory $CASA_SRC/sacha-gpl
# directory $CASA_SRC/sacha-nonfree
directory $CASA_SRC/soma-base
directory $CASA_SRC/soma-io
directory $CASA_SRC/soma-workflow
directory $CASA_SRC/sulci-nonfree
# Remove web project because it needs bv_env_host to compile
# directory $CASA_SRC/web
directory $CASA_SRC/whasa-gpl
directory $CASA_SRC/whasa-nonfree

brainvisa $CASA_DISTRO $CASA_BRANCH $CASA_SRC
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions setup/conda/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/sh

export CASA="$1"
if [ -z "$CASA" ]; then
echo "Missing target directory"
exit 1
fi

export CASA_DISTRO="$2"
if [ -z "$CASA_DISTRO" ]; then
echo "Missing distro"
exit 1
fi

export CONDA="$CASA/conda"
export CASA_SRC="$CASA/src"
export CASA_DISTRO_SRC="$CASA_SRC/casa-distro"

set -e
set -x

if [ ! -e "$CASA_SRC" ]; then
mkdir --parents "$CASA_SRC"
git -C "$CASA_SRC" clone --branch conda https://github.com/brainvisa/casa-distro
git -C "$CASA_SRC" clone --branch conda https://github.com/brainvisa/brainvisa-cmake
fi

if [ ! -e "$CASA/conf" ]; then
mkdir "$CASA/conf"
ln -s ../src/casa-distro/setup/conda/bv_maker.cfg "$CASA/conf"
cat > "$CASA/conf/environment.sh" << END_OF_FILE
export CASA_DISTRO=$CASA_DISTRO
END_OF_FILE
fi


if [ ! -e "$CONDA" ]; then
. "$CASA/src/casa-distro/setup/conda/setup_conda"
ln -s ../../../../src/casa-distro/setup/conda/casa-distro_activate.sh "$CONDA/etc/conda/activate.d"
ln -s ../../../../src/casa-distro/setup/conda/casa-distro_deactivate.sh "$CONDA/etc/conda/deactivate.d"
"$CASA/setup_run_conda"
"$CASA/setup_run_compiled"
"$CASA/setup_dev_conda"
fi
4 changes: 2 additions & 2 deletions setup/conda/setup_conda
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ fi
mkdir "$CONDA"
sh "$CASA/$installer" -u -b -p "$CONDA"
if [ -e "$CONDA/bin/mamba" ]; then
# If mamba is installed, we use conda-forge
# If mamba is installed
export conda="$CONDA/bin/mamba"
export conda_install="-y"
# Use most recent glibc ABI (the one used by conda-forge to compile Qt)
"$conda" install -y sysroot-conda_2_28-x86_64
else
# mamba is not installed, we use anaconda
# mamba is not installed
export conda="$CONDA/bin/conda"
export conda_install="-y --solver=libmamba"
# Install packages to use mamba to find packages
Expand Down
24 changes: 0 additions & 24 deletions setup/conda/setup_dev

This file was deleted.

0 comments on commit 3e0ee6d

Please sign in to comment.