Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

set explicit tags for SIRF-Exercises and SIRF-contribs #920

Open
KrisThielemans opened this issue Jul 10, 2024 · 1 comment
Open

set explicit tags for SIRF-Exercises and SIRF-contribs #920

KrisThielemans opened this issue Jul 10, 2024 · 1 comment
Assignees
Milestone

Comments

@KrisThielemans
Copy link
Member

We currently default to origin/master but that will break things at some point. This would be important for PETRIC as well (need to have a reproducible set-up)

@KrisThielemans
Copy link
Member Author

SIRF-contribs

set(DEFAULT_SIRF-Contribs_TAG origin/master)

so let's add this to our Release task list.

SIRF-Exercises

This is far more complicated, see lines below. Doing this properly awaits a SIRF pypy project, so at present we will only tag SIRF-Exercsies, but not use the tag in the install scripts yet.

cd $SIRF_SRC_PATH
clone_or_pull https://github.com/SyneRBI/SIRF-Exercises.git
cd $SIRF_SRC_PATH/SIRF-Exercises
# Python (runtime)
if [ -f requirements.txt ]; then
"$PYTHON_EXECUTABLE" -m pip install -U -r requirements.txt
fi

git clone https://github.com/SyneRBI/SIRF-Exercises --recursive $INSTALL_DIR/SIRF-Exercises
#install SIRF-Exercises requirements
cd $INSTALL_DIR/SIRF-Exercises
if [ "$PYTHON" = "miniconda" ]; then
if [ -f environment.yml ]; then
if test "${BUILD_GPU:-0}" != 0; then
# uncomment GPU deps
sed -r 's/^(\s*)#\s*(- \S+.*#.*GPU.*)$/\1\2/' environment.yml > environment-sirf.yml
else
# delete GPU deps
sed -r -e '/^\s*- (astra-toolbox|tigre).*/d' -e '/^\s*- \S+.*#.*GPU/d' environment.yml > environment-sirf.yml
fi
# do not install CIL from conda if BUILD_CIL is set
if test "${BUILD_CIL:-OFF}" != "OFF"; then
# delete CIL package from the environment file
echo "Deleting CIL from the environment file BUILD_CIL is set to >${BUILD_CIL}<"
sed -r -i -e '/^\s*- (cil).*/d' environment-sirf.yml
cat environment-sirf.yml
else
echo "Not deleting CIL from the environment file BUILD_CIL is set to >${BUILD_CIL}<"
fi
conda env update --file environment-sirf.yml
else
if [ -f requirements.txt ]; then
cat requirements.txt
# installing the requirements.txt with conda requires some cleaning of the requirements.txt
# Also the requirements.txt contains some packages that are not found on conda-forge, i.e. brainweb
# Therefore, these need to be installed by pip.
# This is handled by the install-sirf-exercises-dep.py script
python ~/install-sirf-exercises-dep.py requirements.txt
else
echo "SIRF-Exercises requirements: did not find requirements.txt nor environment.yml. Skipping"
fi
fi
else
if [ -f requirements.txt ]; then
# just install the requirements.txt with pip
${PYTHON} -m pip install -U -r requirements.txt
else
echo "SIRF-Exercises requirements: did not find requirements.txt. Skipping"
fi
fi

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants