|
| 1 | +FROM nvidia/cuda:10.0-base-ubuntu18.04 |
| 2 | + |
| 3 | +LABEL maintainer="Vincent Prevosto <prevosto@mit.edu>" |
| 4 | + |
| 5 | +# Copy files for dev/tests |
| 6 | +COPY packages /srv/packages |
| 7 | +COPY test_files /home/test_files |
| 8 | + |
| 9 | +# USER root |
| 10 | +# Ubuntu package installs |
| 11 | +RUN apt update && \ |
| 12 | + apt install -y --no-install-recommends \ |
| 13 | + libfftw3-dev \ |
| 14 | + git \ |
| 15 | + wget && \ |
| 16 | + apt clean && \ |
| 17 | + rm -rf /var/lib/apt/lists/* |
| 18 | + |
| 19 | +# install miniconda |
| 20 | +ENV MINICONDA_VERSION 4.12.0 |
| 21 | +ENV CONDA_DIR /home/miniconda3 |
| 22 | +ENV LATEST_CONDA_SCRIPT "Miniconda3-py38_$MINICONDA_VERSION-Linux-x86_64.sh" |
| 23 | + |
| 24 | +RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \ |
| 25 | + bash ~/miniconda.sh -b -p $CONDA_DIR && \ |
| 26 | + rm ~/miniconda.sh |
| 27 | +# RUN echo 'export PATH="/home/miniconda3/bin:$PATH"' >> ~/.bashrc |
| 28 | +ENV PATH=$CONDA_DIR/bin:$PATH |
| 29 | +RUN conda update conda && \ |
| 30 | + conda install conda-build |
| 31 | + |
| 32 | +# make conda activate command available from /bin/bash --login shells |
| 33 | +RUN echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> /root/.profile |
| 34 | +# make conda activate command available from /bin/bash --interactive shells |
| 35 | +RUN conda init bash |
| 36 | + |
| 37 | +# Install IBL port of pykilosort |
| 38 | +RUN git clone -b drift_test_stable https://github.com/kushbanga/pykilosort.git /src/pykilosort |
| 39 | +WORKDIR /src/pykilosort |
| 40 | + |
| 41 | +# Create environment |
| 42 | +RUN conda env create -f pyks2.yml |
| 43 | + |
| 44 | +# Install pykilosort |
| 45 | +SHELL ["conda","run","-n","pyks2","/bin/bash","-c"] |
| 46 | +RUN conda install --quiet --yes ipykernel && \ |
| 47 | + python -m ipykernel install --user --name pyks2 --display-name "pyKilosort" && \ |
| 48 | + pip install -U -r /srv/packages/testing_requirements.txt && \ |
| 49 | + conda develop . |
| 50 | + |
| 51 | +RUN rm -rf /srv/packages |
0 commit comments