Closed maciej-jedynak closed 7 months ago
It will not solve the bug, but there is a way to make a virtualenv environment inside casa-distro. 1) install a brainvisa developer following the instructions in https://brainvisa.info/web/download.html#developer-environment-installation 2) Then enter into brainvisa bash and install and activate the virtual env:
bv bash
virtualenv --python=python3 --system-site-packages venv
. venv/bin/activate
We have several outdated docs, sorry. We now only use casa_distro from within a container (or virtual machine when container is not possible). If it is compatible with your use case, I would recommend to follow the instruction from this page to setup a development environment. These instruction mus be updated too ; you should use apptainer instead of singularity, this is the new name of this project since a fork a few years ago. Using a container is the best option to have all the required dependencies to build BrainVISA projects.
Thank you. Short version: imports of soma and anatomist work now when using casa_distro from the container.
Long version: I did the following: according to your instruction I install appteiner, however:
trying to overwrite '/usr/bin/run-singularity', which is also in package singularity-ce 3.8.3~ubuntu-20.04
it might be just a matter of names then. I try with singularity, easily installable from the Ubuntu packages repo:
singularity run -c -B $HOME/casa_distro/brainvisa-opensource-master:/casa/setup /media/maciek/Data_Partition/BrainVISA/casa-dev-5.0.sif branch=master distro=opensource
export PATH="$HOME/casa_distro/brainvisa-opensource-master/bin:$PATH"
bv_maker
The last command finishes with the following error:
bv_maker summary:
OK step sources: /casa/host/src, started: 2024/01/31 13:36, stopped: 2024/01/31 13:36
OK step configure: /casa/host/build, started: 2024/01/31 13:36, stopped: 2024/01/31 13:37
OK step build: /casa/host/build, started: 2024/01/31 13:37, stopped: 2024/01/31 13:56
FAILED step doc: /casa/host/build, started: 2024/01/31 13:56, stopped: 2024/01/31 13:59
There were errors.
It seems to me it only concerns documentation, so the environment should work. I therefore do:
bv bash
A conda-like environment name "opensource-master-5.3" appears before the command prompt.
python3 my_code_with_brainvisa_imports.py
executes the import section of my code without errors! Sadly, it crashes later, but that is probably a different story.
Not sure if you want to leave this bug open, so it reminds of the original problem (in the title).
Yes there is a problem with the docs. There is a crash in sphinx somewhere in the version we are using, but if we upgrade it, it doesn't crash there, but hangs at another place, which is worse. Maybe a later version will fix all these (I hope so) but for now it's broken. Anyway you're right, it's not important for you.
Sadly, it crashes later,
it it a problem with brainvisa code ?
Not sure if you want to leave this bug open, so it reminds of the original problem (in the title).
I think we should consider this issue closed (thus close it), and reopen another ticket on a different topic if needed.
it it a problem with brainvisa code ?
I think rather my use of it. Thank you.
Hello, my intention is to start an environment in which I could import soma and anatomist. I follow steps from this page, so I first clone:
git clone https://github.com/brainvisa/casa-distro.git /tmp/casa-distro
then I issue two commands not covered in the documentation page, but I understand they are needed:cd /tmp/casa-distro/
python3 setup.py install
and then I do:so, seems like the setup_dev option of the casa_distro command does not work.