Blame view

Dockerfile 5.03 KB
c1067e64   Etienne Pallier   Changement OS pou...
1
FROM ubuntu:20.04
83cfb55c   Etienne Pallier   sphinx autodoc ge...
2

e4c37a1a   Alexis Koralewski   Upgrading mysql v...
3
ARG uid
5357999a   Alexis Koralewski   add Dockerfile
4
5

RUN apt-get update && apt-get install -y \
b183b691   akoralewski   add git on pyros ...
6
    default-mysql-client \
c1067e64   Etienne Pallier   Changement OS pou...
7
	libmysqlclient-dev \
50cbd417   Alexis Koralewski   add nano and vi t...
8
9
    git \
    nano \
83cfb55c   Etienne Pallier   sphinx autodoc ge...
10
11
    vim

c1067e64   Etienne Pallier   Changement OS pou...
12
13
14
15
RUN apt-get install -y python3.8
RUN apt-get install -y python3-pip


83cfb55c   Etienne Pallier   sphinx autodoc ge...
16
# DEV only
776d0b6c   Etienne Pallier   pyros v0.4
17
# for dot => PNG diagrams generation with pyreverse (pylint)
c1067e64   Etienne Pallier   Changement OS pou...
18
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
776d0b6c   Etienne Pallier   pyros v0.4
19
RUN apt-get install -y graphviz graphviz-dev
c1067e64   Etienne Pallier   Changement OS pou...
20
RUN apt-get install -y python3-tk
b183b691   akoralewski   add git on pyros ...
21

83cfb55c   Etienne Pallier   sphinx autodoc ge...
22
23
# Guitastro
RUN apt-get install -y \
776d0b6c   Etienne Pallier   pyros v0.4
24
	# - ASTROMETRY.NET (in order to process images locally, without having to send (big) images to astrometry.net)
c1067e64   Etienne Pallier   Changement OS pou...
25
	astrometry.net astrometry-data-tycho2 \
83cfb55c   Etienne Pallier   sphinx autodoc ge...
26
27
	#astrometry-data-2mass
	# - PIL
c1067e64   Etienne Pallier   Changement OS pou...
28
	python3-pil python3-pil.imagetk
83cfb55c   Etienne Pallier   sphinx autodoc ge...
29
30

# - INDI => for Guitastro
79db9a00   Etienne Pallier   updated Dockerfil...
31
# https://indilib.org/get-indi/download-ubuntu.html
83cfb55c   Etienne Pallier   sphinx autodoc ge...
32
33
# For apt-add-repository :
RUN apt-get install -y software-properties-common
776d0b6c   Etienne Pallier   pyros v0.4
34
# Add repository
83cfb55c   Etienne Pallier   sphinx autodoc ge...
35
RUN apt-add-repository ppa:mutlaqja/ppa
776d0b6c   Etienne Pallier   pyros v0.4
36
# Add public key for this repo
79db9a00   Etienne Pallier   updated Dockerfil...
37
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 487CEC2B3F33A288
776d0b6c   Etienne Pallier   pyros v0.4
38
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 487CEC2B3F33A288
79db9a00   Etienne Pallier   updated Dockerfil...
39
40
41
#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
83cfb55c   Etienne Pallier   sphinx autodoc ge...
42
#10 1.751 E: The repository 'http://ppa.launchpad.net/mutlaqja/ppa/ubuntu jammy InRelease' is not signed.
79db9a00   Etienne Pallier   updated Dockerfil...
43
RUN apt-get update 
c1067e64   Etienne Pallier   Changement OS pou...
44
45
46
47
48
49
50
51
52
53
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
83cfb55c   Etienne Pallier   sphinx autodoc ge...
54
55
56
57
58
59
60
61
62
63
64
65
# 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/
c1067e64   Etienne Pallier   Changement OS pou...
66
# (you will have to fill a form to be able to download)
83cfb55c   Etienne Pallier   sphinx autodoc ge...
67
68
69
70
71
# 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
c1067e64   Etienne Pallier   Changement OS pou...
72
73
COPY ./install/guitastro/pylon_6.3.0.23157-deb0_amd64.deb .
RUN apt-get install ./pylon_6.3.0.23157-deb0_amd64.deb
83cfb55c   Etienne Pallier   sphinx autodoc ge...
74
75
76
77
78
79
80
81
82
83
84
85

# 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

c1067e64   Etienne Pallier   Changement OS pou...
86
87
88
89
#RUN apt-get install -y firefox x11vnc xvfb
#RUN echo "exec firefox" > ~/.xinitrc && chmod +x ~/.xinitrc
#CMD ["x11vnc", "-create", "-forever"]
#RUN x11vnc -create -forever
83cfb55c   Etienne Pallier   sphinx autodoc ge...
90
91


b183b691   akoralewski   add git on pyros ...
92
93
94
# 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

e4c37a1a   Alexis Koralewski   Upgrading mysql v...
95
RUN echo "$uid" > test.txt
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
96
# Adding new user (pyros_user) and creating his home folder
e4c37a1a   Alexis Koralewski   Upgrading mysql v...
97
RUN useradd --create-home --shell /bin/bash pyros_user --uid $uid
5357999a   Alexis Koralewski   add Dockerfile
98
99
100
101
102

# 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

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
103
# Switch from root to pyros_user
5357999a   Alexis Koralewski   add Dockerfile
104
105
USER pyros_user

a6603b26   Alexis Koralewski   Django and Python...
106
RUN pip install --user --upgrade pip
c1067e64   Etienne Pallier   Changement OS pou...
107
#RUN pip install --user wheel
83cfb55c   Etienne Pallier   sphinx autodoc ge...
108
# TODO: pourquoi numpy ??? A virer ?
c1067e64   Etienne Pallier   Changement OS pou...
109
#RUN pip install --user numpy
83cfb55c   Etienne Pallier   sphinx autodoc ge...
110

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
111
# Copy local host machine files to image
699871e9   Alexis Koralewski   adding bin to pat...
112
COPY --chown=pyros_user:pyros_user . .
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
113
114
115
116
# Copy some aliases
RUN cp .bash_aliases ..
#RUN mv .bash_aliases ..
#COPY --chown=pyros_user:pyros_user .bash_aliases ..
699871e9   Alexis Koralewski   adding bin to pat...
117

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
118
# Adding local/bin to path to avoid pip warning
699871e9   Alexis Koralewski   adding bin to pat...
119
120
ENV PATH "$PATH:/home/pyros_user/.local/bin"

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
121
# Installing click on the image to prevent error on the first execution of the installation script
699871e9   Alexis Koralewski   adding bin to pat...
122
123
RUN pip install --user click

540fa833   Etienne Pallier   New requirements....
124
125
126
127
128
129
130
131
132
# (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

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
133
# Installing packages required for PyROS
12ddccd6   Etienne Pallier   sphinx doc auto g...
134
RUN pip install --user -r ./install/requirements.txt
2b4e74ac   Etienne Pallier   sphinx autodoc v5
135
RUN pip install --user -r ./install/requirements_dev.txt