https://github.com/mvdoc/pycortex-singularity
Singularity definition file for pycortex
https://github.com/mvdoc/pycortex-singularity
Last synced: 4 months ago
JSON representation
Singularity definition file for pycortex
- Host: GitHub
- URL: https://github.com/mvdoc/pycortex-singularity
- Owner: mvdoc
- Created: 2018-02-16T00:45:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-16T18:41:12.000Z (over 8 years ago)
- Last Synced: 2025-04-09T21:49:35.002Z (about 1 year ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://singularity-hub.org/collections/604)
# pycortex Singularity container
This repository contains a singularity definition file to create a
container with [pycortex](https://gallantlab.github.io), FreeSurfer, and
FSL. It installs the `glrework-merged` branch of pycortex. Pycortex's
filestore database needs to be mounted externally so that it is
persistent, and must be pointed to `/cortex-filestore` inside the
container.
## How to
### 1. Build the container (this assumes Singularity >= 2.4.2), or pull from singularity hub
```terminal
singularity build pycortex.img Singularity
```
alternatively, the image can be pulled from singularity-hub
```terminal
singularity pull --name pycortex.img shub://mvdoc/pycortex-singularity
```
### 2. Run it mounting the relevant directories, e.g.
```terminal
singularity run -B /path/to/my/data:/data \
-B /path/to/my/filestore:/cortex-filestore \
-e -c pycortex.img
```
This will start a shell inside the container; then one can run a jupyter
notebook session with
```terminal
jupyter notebook --no-browser --port=9999
```
If you need to use FreeSurfer, you should set the environment variable `FS_LICENSE` to point to your `license.txt` file:
```terminal
export FS_LICENSE=/path/to/license.txt
```
The container can also be used as a wrapper for commands, for example
```terminal
$ singularity run \
-B /path/to/my/filestore:/cortex-filestore \
-e -c pycortex.img \
"python -c 'import cortex; print(cortex.__file__)'"
/src/pycortex/cortex/__init__.py
```