-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (39 loc) · 1.45 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
FROM vanessa/expfactory-builder:base
########################################
# Configure
########################################
ENV EXPFACTORY_STUDY_ID expfactory
ENV EXPFACTORY_SERVER localhost
ENV EXPFACTORY_CONTAINER true
ENV EXPFACTORY_DATA /scif/data
ENV EXPFACTORY_DATABASE filesystem
ENV EXPFACTORY_HEADLESS false
ENV EXPFACTORY_BASE /scif/apps
ADD startscript.sh /startscript.sh
RUN chmod u+x /startscript.sh
WORKDIR /opt
#RUN git clone -b master https://www.github.com/expfactory/expfactory
ADD expfactory/ /opt/expfactory
WORKDIR expfactory
RUN cp script/nginx.gunicorn.conf /etc/nginx/sites-enabled/default && \
cp script/nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /scif/data # saved data
RUN mkdir -p /scif/apps # experiments
RUN mkdir -p /scif/logs # gunicorn logs
RUN python3 -m pip install gunicorn
RUN cp expfactory/config_dummy.py expfactory/config.py && \
chmod u+x /opt/expfactory/script/generate_key.sh && \
/bin/bash /opt/expfactory/script/generate_key.sh /opt/expfactory/expfactory/config.py
RUN python3 setup.py install
RUN python3 -m pip install pyaml pymysql psycopg2
RUN apt-get clean # tests, mysql, postgres
########################################
# Experiments
########################################
LABEL EXPERIMENT_stroop-task /scif/apps/stroop-task
ADD stroop-task /scif/apps/stroop-task
WORKDIR /scif/apps
RUN expfactory install stroop-task
ENTRYPOINT ["/bin/bash", "/startscript.sh"]
EXPOSE 5000
EXPOSE 80