Skip to content

Commit 931f7b8

Browse files
committed
Update working yass dockerfile
1 parent 8571ab7 commit 931f7b8

2 files changed

Lines changed: 8 additions & 53 deletions

File tree

yass/Dockerfile

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,21 @@
1-
#docker build -t ibl/yass:base .
21
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
32

43
# link the cuda libraries
54
ENV 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-
ENV LANG C.UTF-8
11-
6+
# install ubuntu packages
127
RUN apt-get update
138
RUN apt-get install -y software-properties-common wget git
149

15-
# Install conda from: https://towardsdatascience.com/conda-pip-and-docker-ftw-d64fe638dc45
16-
SHELL [ "/bin/bash", "--login", "-c" ]
17-
18-
# Create a non-root user
19-
ARG username=si
20-
ARG uid=1000
21-
ARG gid=100
22-
ENV USER $username
23-
ENV UID $uid
24-
ENV GID $gid
25-
ENV HOME /home/$USER
26-
RUN adduser --disabled-password \
27-
--gecos "Non-root user" \
28-
--uid $UID \
29-
--gid $GID \
30-
--home $HOME \
31-
$USER
32-
33-
COPY entrypoint.sh /usr/local/bin/
34-
RUN chown $UID:$GID /usr/local/bin/entrypoint.sh && \
35-
chmod u+x /usr/local/bin/entrypoint.sh
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" ]
3613

37-
38-
USER $USER
3914
# install miniconda
4015
ENV MINICONDA_VERSION 4.8.2
41-
ENV CONDA_DIR $HOME/miniconda3
42-
#https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh
16+
ENV CONDA_DIR /home/miniconda3
4317
ENV LATEST_CONDA_SCRIPT "Miniconda3-py37_$MINICONDA_VERSION-Linux-x86_64.sh"
4418

45-
4619
RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \
4720
chmod +x ~/miniconda.sh && \
4821
~/miniconda.sh -b -p $CONDA_DIR && \
@@ -51,26 +24,14 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/m
5124
# make non-activate conda commands available
5225
ENV PATH=$CONDA_DIR/bin:$PATH
5326
# make conda activate command available from /bin/bash --login shells
54-
RUN echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> ~/.profile
55-
# make conda activate command available from /bin/bash --interative shells
27+
RUN echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> /root/.profile
28+
# make conda activate command available from /bin/bash --interactive shells
5629
RUN conda init bash
5730

58-
# create a project directory inside user home
59-
ENV PROJECT_DIR $HOME/app
60-
RUN mkdir $PROJECT_DIR
61-
WORKDIR $PROJECT_DIR
62-
63-
ENV CONDA_ENV_NAME yass
64-
RUN conda create -n $CONDA_ENV_NAME
65-
RUN conda activate $CONDA_ENV_NAME
66-
67-
68-
# install yass
31+
# install YASS
6932
RUN conda install pytorch==1.2
70-
#RUN git clone --depth 1 --branch v2.0 https://github.com/paninski-lab/yass \
7133
RUN git clone https://github.com/paninski-lab/yass \
7234
&& cd yass \
73-
&& git checkout d9c9e2c52287afeb3256bdfde749f75f5083fd5d \
7435
&& pip --no-cache-dir install -e . \
7536
&& cd src/gpu_bspline_interp \
7637
&& python setup.py install --force \
@@ -81,5 +42,3 @@ RUN git clone https://github.com/paninski-lab/yass \
8142
&& pip install .
8243

8344
RUN pip install scipy==1.2.0
84-
85-
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]

yass/entrypoint.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)