Dockerfile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. FROM continuumio/miniconda3:24.7.1-0
  2. WORKDIR /analysis
  3. COPY . .
  4. # update & upgrade apt-get
  5. RUN apt-get update && \
  6. apt-get upgrade -y
  7. # install git & git-annex
  8. RUN apt-get install -y curl
  9. # download the dataset with git (files will be tracked with git-annex)
  10. # https://openneuro.org/datasets/ds005594
  11. # (alternatively, comment this line out and place the data in the docker directory before building, as a directory named 'eeg')
  12. # RUN git clone https://github.com/OpenNeuroDatasets/ds005594 eeg
  13. # RUN git -C eeg annex get --all
  14. # RUN datalad install https://github.com/OpenNeuroDatasets/ds005594.git eeg
  15. RUN (cd eeg && ./download_raw_eeg.sh)
  16. # install TexLive 2023 (used in some figures)
  17. # see https://www.tug.org/historic/ for other mirrors
  18. RUN wget ftp://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2023/install-tl-unx.tar.gz
  19. RUN zcat < install-tl-unx.tar.gz | tar xf -
  20. RUN perl install-tl-2023*/install-tl --no-interaction --scheme=basic --repository=ftp://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2023/tlnet-final/
  21. ENV PATH="/usr/local/texlive/2023/bin/x86_64-linux:$PATH"
  22. RUN rm -r install-tl-*
  23. # install TexLive packages
  24. RUN tlmgr init-usertree
  25. RUN tlmgr install xcolor tex-gyre underscore etoolbox pgf
  26. # install environments for Python and R
  27. RUN conda env create -f env/environment-mne.yml
  28. RUN conda env create -f env/environment-rdms.yml
  29. RUN conda env create -f env/environment-r.yml
  30. # set up fonts for matplotlib
  31. RUN conda run -n mne --no-capture-output python fig_code/mpl_setup_fonts.py
  32. RUN conda run -n rdms --no-capture-output python fig_code/mpl_setup_fonts.py
  33. # unbuffered stdout & stderr streams by default
  34. ENV PYTHONUNBUFFERED=1
  35. # disable healthchecks, to address containers dying with code Exited(137) bug when OOMKilled=False
  36. HEALTHCHECK NONE