Debian Codegraph @

docker/Dockerfile

raw
1 # FROM continuumio/miniconda3:4.11.0
2 FROM continuumio/miniconda3:latest
3 MAINTAINER Kael Dai <[email protected]>
4
5 # RUN apt-get -y update && apt-get install -y automake \
6 # libtool \
7 # build-essential \
8 # libncurses5-dev \
9 # git \
10 # cmake
11 # # software-properties-common \
12 # # dpkg-dev
13 # # cmake
14 # # libopenblas-dev
15 RUN apt-get -y update && apt-get install -y automake \
16 build-essential \
17 git
18
19
20 COPY environment.yml .
21 RUN conda env create -f environment.yml
22
23 # Make sure all further commands will run using bmtk environment
24 SHELL ["conda", "run", "-n", "bmtk", "/bin/bash", "-c"]
25
26 ENV BUILD_DIR=/home/build
27 ENV HOME_DIR=/home/shared
28 ENV WORK_DIR=${HOME_DIR}/workspace
29 ENV GIT_REPO=https://github.com/AllenInstitute/bmtk.git
30 ENV GIT_BRANCH=develop
31
32 RUN mkdir -p ${BUILD_DIR}
33 RUN mkdir -p ${HOME_DIR}
34 RUN mkdir -p ${WORK_DIR}
35
36 # #RUN conda update -n base -c defaults conda \
37 # # && conda install python=3.6
38 # RUN conda install -y numpy h5py lxml pandas matplotlib jsonschema scipy sympy jupyter # cmake # anaconda mpi4py mpich-mpicc
39
40
41 # ### Install NEURON for BioNet
42 # RUN pip install neuron
43
44
45 # ### Install NEST for PointNet
46 # #RUN conda install -c conda-forge nest-simulator==2.20.0
47 # #RUN add-apt-repository --enable-source ppa:nest-simulator/nest && \
48 # # apt-get update && \
49 # # apt-clean && \
50 # # apt-get install -y nest
51 # ENV NEST_VER=2.20.0
52 # ENV NEST_INSTALL_DIR=${BUILD_DIR}/nest/build
53
54 # RUN cd ${BUILD_DIR} \
55 # && conda install -y gsl cython \
56 # && wget --quiet https://github.com/nest/nest-simulator/archive/v${NEST_VER}.tar.gz -O nest.tar.gz \
57 # && tar xfz nest.tar.gz \
58 # && cd nest-simulator-${NEST_VER} \
59 # && mkdir build && cd build \
60 # && cmake -DCMAKE_INSTALL_PREFIX=${NEST_INSTALL_DIR} -Dwith-gsl=ON -Dwith-python=ON -Dwith-ltdl=ON .. \
61 # && make \
62 # && make install
63
64 # # Taken from /home/shared/nest/bin/nest_vars.sh, needed to run nest and pynest in jupyter
65 # ENV NEST_DATA_DIR "${NEST_INSTALL_DIR}/share/nest"
66 # ENV NEST_DOC_DIR "${NEST_INSTALL_DIR}/share/doc/nest"
67 # ENV NEST_MODULE_PATH "${NEST_INSTALL_DIR}/lib/nest"
68 # ENV NEST_PYTHON_PREFIX "${NEST_INSTALL_DIR}/lib/${PYTHON_ENV}/site-packages"
69 # ENV PYTHONPATH "${NEST_PYTHON_PREFIX}:${PYTHONPATH}"
70 # ENV PATH "${NEST_INSTALL_DIR}/bin:${PATH}"
71
72
73 #### Install DiPDE for PopNet
74 RUN cd ${BUILD_DIR}; \
75 git clone https://github.com/AllenInstitute/dipde.git dipde; \
76 pwd; \
77 cd dipde; \
78 pip install -e .;
79
80
81 #### Install the bmtk
82 RUN cd ${BUILD_DIR} \
83 && git clone --branch ${GIT_BRANCH} ${GIT_REPO} \
84 && cd bmtk \
85 && python setup.py install
86
87
88 #### Setup the examples and tutorials
89 RUN cd ${BUILD_DIR}/bmtk; \
90 cp -R examples ${HOME_DIR}; \
91 cp -R docs/tutorial ${HOME_DIR}
92
93
94 # #### Add the tutorial for the 2022 workshop
95 # RUN cd ${HOME_DIR}/tutorial; \
96 # git clone https://github.com/AllenInstitute/bmtk_workshop_2022.git
97
98 #### Setup components directories for tutorials, including compiling neuron modfiles
99 # RUN cd ${HOME_DIR}/tutorial \
100 # && pwd \
101 # && ls -l \
102 # && cp -R ../../examples/*_components . \
103 # && cd bio_components/mechanisms # \
104 # # && nrnivmodl modfiles/
105
106 #### Pre-compile mechanisms for BioNet examples
107 RUN cd ${HOME_DIR}/examples/bio_components/mechanisms \
108 && nrnivmodl modfiles/
109
110
111 #### Pre-compile mechanisms for BioNet examples
112 RUN cd ${HOME_DIR}/tutorial/modeling_tut_2021/components/mechanisms \
113 && nrnivmodl modfiles/
114
115
116 #### Add the tutorial for the 2023 workshop
117 RUN cd ${HOME_DIR}; \
118 git clone https://github.com/AllenInstitute/bmtk-workshop.git
119
120 #### Create an entry point for running the image
121 COPY entry_script.sh ${BUILD_DIR}
122 RUN chmod +x ${BUILD_DIR}/entry_script.sh
123 ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "bmtk", "/home/build/entry_script.sh"]
124 # ENTRYPOINT ["/home/build/entry_script.sh"]