LNCD

Table of Contents

Table of Contents

  • Docker
    • Using
      • Hints
    • Creating
    • On rhea
  • LNCD Home
  • Administration
  • Notebooks
  • Journal Club Presentations
  • Publications
  • Current Projects
  • Completed Projects
  • Current Grants
  • Datasets by Project
  • Brain ROIs and Measures
  • ️Tools And Methods
  • Big Data
  • RA Homepage
  • Recent Changes
  • Maintenance
  • Site Map
  • Random Page
LNCD
Docs » Docker

Docker

Docker containers are one way of establishing a fixed software environment. This is ideal for sharing the exact version and setup used for running your project.

Using

see fmriprep's docker documenation

Hints

  • Use bind mounts to map an actual path to a virtual one within the container like -v /abs/actual/path:/path/in/container
    • bind mount files that might otherwise be downloaded and discarded like TemplateFlow.
  • use --user to not run as root. --user $(id -u):$(id -g). w/o user, containers may run as root and
  • export variables for your local environment to the container like --env FS_LICSENSE
    • combine with bind mount
      rundocker.bash
      docker run -v $FS_LICENSE:$FS_LICENSE --env FS_LICENSE freesurfer/freesurfer 
  • use --entrypoint to change what gets run. eg -it --entrypoint bash for debugging.

Creating

see Ten simple rules for writing Dockerfiles for reproducible data science

On rhea

on Rhea (linux server), docker containers are stored in /home/ni_tools/docker replacing the default folder /var/lib/docker with a symbolic link

ls -l  /var/lib/docker
lrwxrwxrwx 1 root root 21 Apr 18  2018 /var/lib/docker -> /home/ni_tools/docker

 df -h /home
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc2       3.4T  952G  2.3T  30% /home
Previous Next