-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbase.Dockerfile
37 lines (31 loc) · 1.05 KB
/
base.Dockerfile
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
FROM nvidia/cuda:10.1-devel
# General container initialization
RUN apt-get update
# Install pyenv to manage the required version of Python
RUN apt-get install git -y
RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv
RUN cd /root/.pyenv && git checkout v1.2.11
# Set the environment variables that are required to use pyenv
ENV PYENV_ROOT=/root/.pyenv
ENV PATH=$PYENV_ROOT/bin:$PATH
# Install the required version of Python from source
RUN apt-get install \
build-essential \
curl \
libbz2-dev \
libffi-dev \
libssl-dev \
libsqlite3-dev \
libreadline-dev \
liblzma-dev \
zlib1g-dev \
-y
RUN pyenv install 3.7.3
RUN git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
# Install Git LFS
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apt-get install git-lfs
# Setup the pyenv
RUN pyenv virtualenv 3.7.3 floods-backend-3.7.3
ENV PATH=/root/.pyenv/versions/3.7.3/envs/floods-backend-3.7.3/bin/:$PATH
RUN pip install --upgrade pip