-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
95 lines (63 loc) · 2.03 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
###
### eNERVE dependencies installation
###
### base image found here https://hub.docker.com/_/python
### first stage (base, with Python 3.10)
ARG VERSION
FROM python:3.10 AS base
# set where NERVE is contained
ENV PYTHONPATH "${PYTHONPATH}:/eNERVE"
ENV LANG C
FROM base AS intermediate
#FROM ubuntu:14.04.4
RUN apt-get update && apt-get install -y apt-transport-https
RUN pip install setuptools==65.4.1
RUN apt-get install -y apt-transport-https
RUN apt-get update
RUN apt-get install -y sudo curl git
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
RUN sudo apt-get install git-lfs
RUN sudo git lfs install
RUN sudo git lfs clone https://github.com/francescopatane96/nerve_data.git
RUN mkdir /DeepFRI
WORKDIR ./DeepFRI
RUN mv /nerve_data/DeepFri.tar.gz DeepFri.tar.gz && \
tar xvzf ./DeepFri.tar.gz
RUN rm -r DeepFri.tar.gz
RUN mv DeepFri/* .
RUN mv /nerve_data/newest_trained_models.tar.gz trained_models.tar.gz && \
tar xvzf trained_models.tar.gz
RUN rm -r trained_models.tar.gz
#RUN mv trained_models/* DeepFri && rm -r trained_models
WORKDIR /
RUN mv /nerve_data/iFeature.tar.gz iFeature.tar.gz && \
tar xvzf iFeature.tar.gz
RUN rm -r iFeature.tar.gz
RUN sudo apt-get update
RUN pip install --upgrade pip
# install python dependencies
COPY requirements.txt .
RUN pip install requests
RUN pip install -r ./requirements.txt && \
python -m pip install git+https://github.com/nicolagulmini/tmhmm.py
FROM intermediate AS dependencies
# clone repositories
RUN git clone https://github.com/francescopatane96/eNERVE
RUN mv eNERVE/code/* . #&& rm -r enerve_code
RUN mv eNERVE/* . && rm -r eNERVE
RUN apt-get update
RUN apt-get install -y apt-utils ncbi-blast+
RUN apt-get install nano
FROM dependencies AS setting
# Create workingdir
WORKDIR /workdir
# Create a volume to share files
VOLUME ["/workdir"]
# Create new user
RUN useradd -ms /bin/bash newuser
RUN chown -R newuser:newuser /workdir
# change user
USER newuser
RUN chmod 755 /workdir
WORKDIR /
CMD ["bash"]