-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
76 lines (64 loc) · 2.93 KB
/
Dockerfile
File metadata and controls
76 lines (64 loc) · 2.93 KB
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
FROM ensemblorg/ensembl-vep:release_109.3 AS spython-base
USER root
# Chemins relatifs (fichiers à la racine du repo GitHub)
ADD netstart-1.0c /opt/netstart-1.0c
ADD MORFAL_publi.py /opt/morfal/MORFAL.py
ENV PATH=/opt/python3.8/bin:/opt/netstart-1.0c:$PATH
ENV LC_ALL=C
ENV LANG=C
ENV DEBIAN_FRONTEND=noninteractive
# Installation des dépendances système
#RUN sed -i 's:archive.ubuntu.com:fr.archive.ubuntu.com:gi' /etc/apt/sources.list || true
#RUN apt-get update && apt-get install -y \
RUN apt-get update -o Acquire::Check-Valid-Until=false || true
RUN apt-get install -y wget || echo "FAILED: wget"
RUN apt-get install -y build-essential || echo "FAILED: build-essential"
RUN apt-get install -y zlib1g-dev || echo "FAILED: zlib1g-dev"
RUN apt-get install -y libncurses5-dev || echo "FAILED: libncurses5-dev"
RUN apt-get install -y libgdbm-dev || echo "FAILED: libgdbm-dev"
RUN apt-get install -y libnss3-dev || echo "FAILED: libnss3-dev"
RUN apt-get install -y libssl-dev || echo "FAILED: libssl-dev"
RUN apt-get install -y libreadline-dev || echo "FAILED: libreadline-dev"
RUN apt-get install -y libffi-dev || echo "FAILED: libffi-dev"
RUN apt-get install -y libsqlite3-dev || echo "FAILED: libsqlite3-dev"
RUN apt-get install -y libbz2-dev || echo "FAILED: libbz2-dev"
RUN apt-get install -y liblzma-dev || echo "FAILED: liblzma-dev"
RUN apt-get install -y tk-dev || echo "FAILED: tk-dev"
RUN apt-get install -y uuid-dev || echo "FAILED: uuid-dev"
RUN apt-get install -y samtools || echo "FAILED: samtools"
RUN apt-get install -y tcsh || echo "FAILED: tcsh"
RUN apt-get install -y ca-certificates || echo "FAILED: ca-certificates"
#RUN apt-get clean
#RUN rm -rf /var/lib/apt/lists/*
# Création des répertoires
RUN mkdir -p /opt/morfal || true
RUN mkdir -p /data || true
RUN mkdir -p /out || true
RUN mkdir -p /refs || true
RUN mkdir -p /tmp/python-build || true
RUN chmod -R 755 /opt/netstart-1.0c
WORKDIR /tmp/python-build
# Build Python 3.8 (toutes les étapes dans un seul RUN pour que cd persiste)
#RUN cd /tmp/python-build
RUN wget https://www.python.org/ftp/python/3.8.20/Python-3.8.20.tgz --no-check-certificate && \
tar -xzf Python-3.8.20.tgz && \
cd Python-3.8.20 && \
./configure --prefix=/opt/python3.8 --enable-optimizations && \
make -j"$(nproc)" && \
make install && \
/opt/python3.8/bin/python3.8 --version
WORKDIR /
RUN rm -rf /tmp/python-build
RUN chmod 755 /opt/morfal/MORFAL.py
# Création du wrapper morfal (heredoc dans un seul RUN)
#RUN cat > /usr/local/bin/morfal << 'EOF'
#RUN exec /opt/python3.8/bin/python3.8 /opt/morfal/MORFAL.py "$@"
#RUN EOF
RUN printf '#!/bin/sh\nexec /opt/python3.8/bin/python3.8 /opt/morfal/MORFAL.py "$@"\n' \
> /usr/local/bin/morfal && \
chmod 755 /usr/local/bin/morfal
RUN ln -sf /opt/python3.8/bin/python3.8 /usr/local/bin/python3
RUN ln -sf /opt/python3.8/bin/python3.8 /usr/local/bin/python
#RUN rm -rf /tmp/python-build
#CMD exec /usr/local/bin/morfal "$@"
CMD ["/usr/local/bin/morfal"]