1- # docker build -t ibl/yass:base .
21FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
32
43# link the cuda libraries
54ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
65
7- # setup time zone for tz
8- ENV TZ=Europe/Paris
9- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
10-
11- # Install python3.7
12- RUN apt-get update
13- RUN apt-get install -y software-properties-common wget
14- RUN add-apt-repository ppa:deadsnakes/ppa
6+ # install ubuntu packages
157RUN apt-get update
16- RUN apt-get install -y python3.7 python3.7-dev python3.7-tk python3-pip python3.7-venv git ffmpeg libgtk-3-dev
17-
18- # Install Python dependencies
19- ARG PYTHON=python3.7
20- ENV LANG C.UTF-8
21- ENV CONDA_PATH=/opt/anaconda3
22- ENV ENVIRONMENT_NAME=main
23- SHELL ["/bin/bash" , "-c" ]
24-
25- # Download and install Anaconda.
26- ENV LATEST_CONDA_SCRIPT "Anaconda3-5.3.1-Linux-x86_64.sh"
27- ENV PATH="/root/anaconda2/bin:${PATH}"
28-
29- RUN wget https://repo.continuum.io/archive/$LATEST_CONDA_SCRIPT
30-
31- RUN bash $LATEST_CONDA_SCRIPT -b -p /home/anaconda3 \
32- && echo "export PATH=/home/anaconda/bin:$PATH" >> ~/.bashrc \
33- && /bin/bash -c "source /root/.bashrc"
34-
35- ENV PATH /home/anaconda3/bin:$PATH
36-
8+ RUN apt-get install -y software-properties-common wget git
9+
10+ # set shell to /bin/bash for compatibility with conda
11+ # (hints from: https://towardsdatascience.com/conda-pip-and-docker-ftw-d64fe638dc45)
12+ SHELL [ "/bin/bash" , "--login" , "-c" ]
13+
14+ # install miniconda
15+ ENV MINICONDA_VERSION 4.8.2
16+ ENV CONDA_DIR /home/miniconda3
17+ ENV LATEST_CONDA_SCRIPT "Miniconda3-py37_$MINICONDA_VERSION-Linux-x86_64.sh"
18+
19+ RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \
20+ chmod +x ~/miniconda.sh && \
21+ ~/miniconda.sh -b -p $CONDA_DIR && \
22+ rm ~/miniconda.sh
23+
24+ # make non-activate conda commands available
25+ ENV PATH=$CONDA_DIR/bin:$PATH
26+ # make conda activate command available from /bin/bash --login shells
27+ RUN echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> /root/.profile
28+ # make conda activate command available from /bin/bash --interactive shells
29+ RUN conda init bash
30+
31+ # install YASS
3732RUN conda install pytorch==1.2
38- # RUN rm $LATEST_CONDA_SCRIPT
39- # conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
40-
4133RUN git clone https://github.com/paninski-lab/yass \
4234 && cd yass \
4335 && pip --no-cache-dir install -e . \
@@ -50,5 +42,3 @@ RUN git clone https://github.com/paninski-lab/yass \
5042 && pip install .
5143
5244RUN pip install scipy==1.2.0
53- # cd yass/samples/10chan
54- # yass sort config.yaml
0 commit comments