Skip to content

Commit

Permalink
Merge pull request #530 from flatironinstitute/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
epnev authored May 1, 2019
2 parents 41b3750 + 918f82c commit 257ac66
Show file tree
Hide file tree
Showing 34 changed files with 676 additions and 520 deletions.
2 changes: 1 addition & 1 deletion INSTALL-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ From that prompt. issue the following commands (if you wish to use the dev branc
conda install -n caiman vs2017_win-64
```

At this point you will want to remove a startup script that visual studio made for your conda environment that can cause conda to crash while entering the caiman environment. Use the Windows find-file utility (under the Start Menu) to look for vs2015_compiler_vars.bat and/or vs2015_compiler_vars.bat under your home directory. At least one copy should show up. Delete the version that has conda\envs\caiman as part of its location. You may also want to do a search for keras_activate.bat under your home directory, find the one in conda\envs\caiman, and edit it so KERAS_BACKEND is set to tensorflow rather than theano. You may then continue the installation.
At this point you will want to remove a startup script that visual studio made for your conda environment that can cause conda to crash while entering the caiman environment. Use the Windows find-file utility (under the Start Menu) to look for vs2015_compiler_vars.bat and/or vs2017_compiler_vars.bat under your home directory. If you find one, delete the version that has conda\envs\caiman as part of its location. Some systems versions will not have this file (this is fine and leaves you with nothing to do for this step). You may also want to do a search for keras_activate.bat under your home directory, find the one in conda\envs\caiman, and edit it so KERAS_BACKEND is set to tensorflow rather than theano. You may then continue the installation.

```bash
activate caiman
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pipeline {
steps {
bat '%ANACONDA3%\\scripts\\conda info'
bat '%ANACONDA3%\\scripts\\conda env create -q -f environment.yml -p %CONDA_ENV%'
bat 'del "%CONDA_ENV%\\etc\\conda\\activate.d\\vs2015_compiler_vars.bat'
bat 'if exist "%CONDA_ENV%\\etc\\conda\\activate.d\\vs*_compiler_vars.bat" del "%CONDA_ENV%\\etc\\conda\\activate.d\\vs*_compiler_vars.bat"'
bat '%ANACONDA3%\\scripts\\activate %CONDA_ENV% && set KERAS_BACKEND=tensorflow && pip install . && copy caimanmanager.py %TEMP% && cd %TEMP% && set "CAIMAN_DATA=%TEMP%\\caiman_data" && (if exist caiman_data (rmdir caiman_data /s /q && echo "Removed old caiman_data" ) else (echo "Host is fresh")) && python caimanmanager.py install --force && python caimanmanager.py test'
}
}
Expand Down
27 changes: 27 additions & 0 deletions README-Distros.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CaImAn and Older Linux Distros
=====================
On some older Linux distros, you may have trouble building a working environment because some Conda packages are introducing glibc version requirements into their binary builds. This has been seen on RHEL7/CentOS7 and may show up in other distributions as well. The errors turn up when tensorflow is imported from python code, with the loader failing because it cannot find symbols indicating a modern libc.

Fixing this is not trivial, but it is doable.

Fixing it
=========
To resolve this, you will first want to install a different build of Tensorflow, not from conda-forge. I used
```
conda search -c conda-forge tensorflow
```

to find a version from the main distro built against mkl (you will see mkl in the build string). Having done this, I installed that particular build, in my case by doing the following (your steps may vary):
```
conda install tensorflow=1.13.1=mkl_py37h54b294f_0
```

This works, but in doing so it changed your version of opencv and a number of other things to non-conda-forge versions. The non-conda-forge builds of opencv are built without graphical bindings, making them not useful for some things in CaImAn. We can switch them back by looking for available builds of opencv using a conda search command like the above, and then selecting a (similar version to what we got) suitable conda-forge build of opencv. In my case I finished fixing it with:

```
conda install -c conda-forge opencv=3.4.4
```

Support
=======
This is not a pretty procedure, but we will try to support it if it is necessary in your environment.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ If you prefer to manage this information somewhere else, the `CAIMAN_DATA` envir

Alternative environments:
* [Using GPU](/README-GPU.md)
* [Older Linux Distros](/README-Distros.md)

### Known Issues

Expand Down
Loading

0 comments on commit 257ac66

Please sign in to comment.