-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
76 lines (58 loc) · 1.85 KB
/
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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
## commands to build and run this docker file
# docker build -t deep-conv-rf:latest - < Dockerfile
# docker run -it --rm -v <local_host_dir_path>:/root/workspace/ --name deep-conv-rf-env deep-conv-rf:latest
FROM ubuntu:16.04
# set maintainer
LABEL maintainer="[email protected]"
# update
RUN apt-get update && apt-get -y upgrade
# install packages
RUN apt-get install -y \
cmake \
cpio \
gfortran \
libpng-dev \
freetype* \
libblas-dev \
liblapack-dev \
libatlas-base-dev \
software-properties-common\
git \
man \
wget
# install python3
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update
RUN apt-get install -y \
python3.6 \
python3.6-dev
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3.6 get-pip.py
RUN ln -s /usr/bin/python3.6 /usr/local/bin/python
# Install RerF dependencies
RUN apt-get install -y build-essential cmake python3-dev libomp-dev vim
# make a directory for mounting local files into docker
RUN mkdir /root/workspace/
# change working directory to install RerF
RUN mkdir /root/code/
WORKDIR /root/code/
# clone the RerF code into the container
RUN git clone https://github.com/neurodata/RerF.git .
# go to Python subdir (install python bindings)
WORKDIR /root/code/Python
# install python requirements
RUN pip install -r requirements.txt
RUN pip install matplotlib seaborn pandas jupyter pycodestyle torch torchvision pytest scikit-learn scipy
# clean old installs
RUN python setup.py clean --all
# install RerF
RUN pip install -e .
# add RerF to PYTHONPATH for dev purposes
RUN echo "export PYTHONPATH='${PYTHONPATH}:/root/code'" >> ~/.bashrc
# clean dir and test if RerF is correctly installed
RUN py3clean .
RUN python -c "import RerF"
# set working dir to workspace (you can mount any local host dir into this path)
WORKDIR /root/workspace/
# launch terminal
CMD ["/bin/bash"]