-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (44 loc) · 1.55 KB
/
Dockerfile
File metadata and controls
62 lines (44 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Run as:
# docker build --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)" -t ecobost/brainreader .
############ Intermediate container to copy private repos
FROM nvidia/cuda:10.1-cudnn7-devel as intermediate
# Install needed libraries
RUN apt update && \
apt install -y openssh-client git
# Authorize SSH Host
RUN mkdir /root/.ssh && \
ssh-keyscan github.com > /root/.ssh/known_hosts
# Add SSH private key to the ssh agent inside this image
ARG SSH_PRIVATE_KEY
RUN echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa && \
chmod 600 /root/.ssh/id_rsa
RUN git clone git@github.com:cajal/featurevis.git /src/featurevis
########### Final Repo
FROM nvidia/cuda:10.1-cudnn7-devel
ARG DEBIAN_FRONTEND=noninteractive
LABEL MANTAINER="Erick Cobos <ecobos@bcm.edu>"
WORKDIR /src
# Copy private repos
COPY --from=intermediate /src/featurevis /src/featurevis
# Upgrade system
RUN apt update && apt upgrade -y
# Install Python 3
RUN apt update && \
apt install -y python3-dev python3-pip python3-tk && \
pip3 install numpy scipy matplotlib jupyterlab
# Install pytorch
RUN pip3 install torch torchvision
# Install other dependencies
RUN pip3 install datajoint scikit-learn
# Install featurevis
RUN pip3 install -e /src/featurevis
# Install brainreader
ADD ./setup.py /src/brainreader/setup.py
ADD ./brainreader /src/brainreader/brainreader
RUN pip3 install -e /src/brainreader
# Install extra libraries (non-essential but useful)
RUN apt install -y git nano
RUN pip3 install ipywidgets
# Clean apt lists
RUN rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/bin/bash"]