Dockerfile
4.55 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
FROM python:3.8
ARG uid
RUN apt-get update && apt-get install -y \
default-mysql-client \
git \
nano \
vim
# DEV only
# for dot => PNG diagrams generation with pyreverse (pylint)
RUN apt-get install -y graphviz graphviz-dev
# Guitastro
RUN apt-get install -y \
# - ASTROMETRY.NET (in order to process images locally, without having to send (big) images to astrometry.net)
astrometry.net astrometry-data-tycho2
#astrometry-data-2mass
# - PIL
#python3-pil python3-pil.imagetk
#python3-venv
#python3-pip
# - INDI => for Guitastro
# https://indilib.org/get-indi/download-ubuntu.html
# For apt-add-repository :
RUN apt-get install -y software-properties-common
# Add repository
RUN apt-add-repository ppa:mutlaqja/ppa
# Add public key for this repo
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 487CEC2B3F33A288
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 487CEC2B3F33A288
#RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 487CEC2B3F33A288
#RUN apt-key adv --keyserver http://ppa.launchpad.net/mutlaqja/ppa/ubuntu/dists/jammy --recv-keys 487CEC2B3F33A288
#RUN apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 487CEC2B3F33A288
#10 1.751 E: The repository 'http://ppa.launchpad.net/mutlaqja/ppa/ubuntu jammy InRelease' is not signed.
RUN apt-get update
#RUN apt-get install -y indi-full
#RUN apt-get install -y gsc
#RUN apt-get install -y kstars-bleeding
#RUN apt-get install -y libindi1
#RUN apt-get install -y indi-bin
#RUN apt-get install -y swig
#RUN apt-get install -y libz3-dev
#RUN apt-get install -y libcfitsio-dev
#RUN apt-get install -y libnova-dev
#RUN apt-get install -y libindi-dev
# Obligatoire ?
#RUN pip install --user --install-option="--prefix=" pyindi-client
# - ASTAP (Astrometry) => for Guitastro
# Download .deb file from https://www.hnsky.org/astap.htm
RUN apt-get install -y wget
RUN wget https://www.hnsky.org/astap_amd64.deb
RUN apt-get install -y ./astap_amd64.deb
RUN rm ./astap_amd64.deb
# - PYLON (Cameras BASLER) => for Guitastro
# https://www.baslerweb.com/en/products/software/basler-pylon-camera-software-suite/
# pylon_6.3.0.23157_x86_64_setup.tar.gz
# tar -xvf pylon_6.3.0.23157_x86_64_setup.tar.gz
# copier le fichier pylon_6.3.0.23157_x86_64.tar.gz à l’endroit où installer le logiciel.
# tar -xvf pylon_6.3.0.23157_x86_64.tar.gz
# apt-get install ./pylon_6.3.0.23157-deb0_amd64.deb
# Guitastro DEV only
# - ANACONDA / SPYDER
# https://www.anaconda.com/products/individual
# Install spyder
# - DOCUMENT GENERATION
# apt-get install python3-sphinx
# apt install spyder
# apt install graphviz libgraphviz-dev
# Get IRAP self signed certificate
RUN echo | openssl s_client -connect gitlab.irap.omp.eu:443 -servername gitlab.irap.omp.eu 2>/dev/null | openssl x509 > /etc/ssl/certs/gitlab.irap.omp.eu.crt
RUN echo "$uid" > test.txt
# Adding new user (pyros_user) and creating his home folder
RUN useradd --create-home --shell /bin/bash pyros_user --uid $uid
# Create the work dir and set permissions as pyros_user
RUN mkdir -p /home/pyros_user/app/ && chown -R pyros_user:pyros_user /home/pyros_user/app
WORKDIR /home/pyros_user/app
# Switch from root to pyros_user
USER pyros_user
RUN pip install --user --upgrade pip
RUN pip install --user wheel
# TODO: pourquoi numpy ??? A virer ?
RUN pip install --user numpy
# Copy local host machine files to image
COPY --chown=pyros_user:pyros_user . .
# Copy some aliases
RUN cp .bash_aliases ..
#RUN mv .bash_aliases ..
#COPY --chown=pyros_user:pyros_user .bash_aliases ..
# Adding local/bin to path to avoid pip warning
ENV PATH "$PATH:/home/pyros_user/.local/bin"
# Installing click on the image to prevent error on the first execution of the installation script
RUN pip install --user click
# (EP 23/3/2022) Installing pip-tools for the management of all the requirements*.txt files (python dependencies packages)
# NB :
# - pip-tools generates a smarter and smaller requirements.txt file than the traditional "pip freeze"
# - pip-tools is also better than the traditional "pip install -r" for installing the python packages
# - Unfortunatly, it is difficult to use with several requirements*.txt files as it is the case for this software : pyros + sphinx + guitastro...
# - So we cannot yet use it completely and still have to use the traditional "pip install -r" anyway ...
# - But we can at least use it to generate all the requirements*.txt files in a far better format
RUN pip install --user pip-tools
# Installing packages required for PyROS
RUN pip install --user -r ./install/requirements.txt
RUN pip install --user -r ./install/requirements_dev.txt