-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile.nomkl
53 lines (40 loc) · 1.33 KB
/
Dockerfile.nomkl
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
# python 3
FROM continuumio/miniconda3:4.11.0
MAINTAINER K. Shankari ([email protected])
# set working directory
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -y git
# install nano and vim for editing
RUN apt-get -y install nano vim
# cleanup
RUN apt-get -y remove --purge build-essential
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#set phone repo using environment variable
echo "Cloning from repo "${SERVER_REPO}" and branch "$SERVER_BRANCH" into "$PWD
git clone $SERVER_REPO
echo "Finished cloning from repo "${SERVER_REPO}" and branch "$SERVER_BRANCH" in "$PWD
cd e-mission-server
git fetch origin $SERVER_BRANCH
git checkout -f $SERVER_BRANCH
# setup base environment
source setup/setup.sh
# setup notebook specific code
RUN conda env update --name emission --file setup/environment36.nomkl.yml
RUN conda clean -t
RUN conda clean -p
if [ -d "/conf" ]; then
echo "Found configuration, overriding..."
cp -r /conf/* conf/
fi
#declare environment variables
ENV DB_HOST=''
ENV WEB_SERVER_HOST=''
#add start script.
# this is a redundant workdir setting, but it doesn't harm anything and might
# be useful if the other one is removed for some reason
ADD start_script.sh /start_script.sh
RUN chmod u+x /start_script.sh
EXPOSE 8080
CMD ["/bin/bash", "/start_script.sh"]