Blame view

Dockerfile 3.71 KB
a6603b26   Alexis Koralewski   Django and Python...
1
FROM python:3.8
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 \
50cbd417   Alexis Koralewski   add nano and vi t...
7
8
    git \
    nano \
83cfb55c   Etienne Pallier   sphinx autodoc ge...
9
10
11
12
13
    vim

# DEV only
RUN apt-get install -y \
	# for dot => PNG diagrams generation with pyreverse (pylint)
2b4e74ac   Etienne Pallier   sphinx autodoc v5
14
	graphviz graphviz-dev
b183b691   akoralewski   add git on pyros ...
15

83cfb55c   Etienne Pallier   sphinx autodoc ge...
16
17
18
19
20
21
22
23
24
25
26
# Guitastro
RUN apt-get install -y \
	# - ASTROMETRY.NET
	astrometry.net astrometry-data-tycho2
	#astrometry-data-2mass
	# - PIL
	#python3-pil python3-pil.imagetk
	#python3-venv
	#python3-pip

# - INDI => for Guitastro
79db9a00   Etienne Pallier   updated Dockerfil...
27
# https://indilib.org/get-indi/download-ubuntu.html
83cfb55c   Etienne Pallier   sphinx autodoc ge...
28
29
30
# For apt-add-repository :
RUN apt-get install -y software-properties-common
RUN apt-add-repository ppa:mutlaqja/ppa
79db9a00   Etienne Pallier   updated Dockerfil...
31
32
33
34
35
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 487CEC2B3F33A288
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --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
83cfb55c   Etienne Pallier   sphinx autodoc ge...
36
#10 1.751 E: The repository 'http://ppa.launchpad.net/mutlaqja/ppa/ubuntu jammy InRelease' is not signed.
79db9a00   Etienne Pallier   updated Dockerfil...
37
RUN apt-get update 
83cfb55c   Etienne Pallier   sphinx autodoc ge...
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
#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



b183b691   akoralewski   add git on pyros ...
79
80
81
# 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...
82
RUN echo "$uid" > test.txt
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
83
# Adding new user (pyros_user) and creating his home folder
e4c37a1a   Alexis Koralewski   Upgrading mysql v...
84
RUN useradd --create-home --shell /bin/bash pyros_user --uid $uid
5357999a   Alexis Koralewski   add Dockerfile
85
86
87
88
89

# 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...
90
# Switch from root to pyros_user
5357999a   Alexis Koralewski   add Dockerfile
91
92
USER pyros_user

a6603b26   Alexis Koralewski   Django and Python...
93
94
RUN pip install --user --upgrade pip
RUN pip install --user wheel
83cfb55c   Etienne Pallier   sphinx autodoc ge...
95
# TODO: pourquoi numpy ??? A virer ?
a6603b26   Alexis Koralewski   Django and Python...
96
RUN pip install --user numpy
83cfb55c   Etienne Pallier   sphinx autodoc ge...
97

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
98
# Copy local host machine files to image
699871e9   Alexis Koralewski   adding bin to pat...
99
COPY --chown=pyros_user:pyros_user . .
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
100
101
102
103
# 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...
104

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

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

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